No subject


Fri Sep 18 15:31:18 CDT 2009


---
001e:trace:msxml:domattr_QueryInterface 0x1ab230
{2933bf80-7b36-11d2-b20e-00c04f983e60} 0x33f994
001e:trace:msxml:xmlnode_get_nodeType 0x1ab230 0x33f9d8
001e:trace:msxml:xmlnode_get_nodeType 0x1ab230 0x33fa48
001e:trace:msxml:xmlnode_get_nodeType 0x1ab230 0x33fa00
001e:trace:msxml:xmlnode_get_nodeValue 0x1ab230 0x33fa00
001e:trace:msxml:xmlnode_get_nodeValue 0x1ab230 returned L"Product Texts Prints
& Posters"
001e:trace:msxml:xmlnode_get_nodeType 0x1ab230 0x33fa1c
001e:trace:msxml:xmlnode_put_nodeValue 0x1ab230 type(2)
001e:trace:msxml:xmlnode_put_nodeValue new value (L"Product Texts Prints &
Posters")
error : unterminated entity reference         Posters
---

So libxml2 is unhappy about '&' in new attribute string value we're trying to
put.
The cause is in improper usage of xmlNodeSetContent() call we do in
IXMLDOMNode_put_nodeValue(). According to documentation we need to perform
string escaping before this call.

A patch like this:
-- patch --
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index da9afd2..3d5a06e 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -351,13 +351,21 @@ static HRESULT WINAPI xmlnode_put_nodeValue(
     case XML_COMMENT_NODE:
     case XML_PI_NODE:
     case XML_TEXT_NODE:
-      {
+    {
+        xmlChar *escaped;
+
+        TRACE("new value (%s)\n", debugstr_w(V_BSTR(&string_value)));
+
         str = xmlChar_from_wchar(V_BSTR(&string_value));
-        xmlNodeSetContent(This->node, str);
+        escaped = xmlEncodeEntitiesReentrant(This->node->doc, str);
         heap_free(str);
+
+        xmlNodeSetContent(This->node, escaped);
+        xmlFree(escaped);
+
         hr = S_OK;
         break;
-      }
+    }
     default:
         /* Do nothing for unsupported types. */
         break;
-- patch --

fixed libxml2 error but doesn't help for update process.

Anyway this found should be fixed. Changing component.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list