msxml3: Handle single quotes in xml declaration.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
12d2417e4f
commit
48f038fb9e
|
@ -284,7 +284,7 @@ static HRESULT WINAPI dom_pi_get_nextSibling(
|
||||||
|
|
||||||
static HRESULT xml_get_value(xmlChar **p, xmlChar **value)
|
static HRESULT xml_get_value(xmlChar **p, xmlChar **value)
|
||||||
{
|
{
|
||||||
xmlChar *v;
|
xmlChar *v, q;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
while (isspace(**p)) *p += 1;
|
while (isspace(**p)) *p += 1;
|
||||||
|
@ -292,11 +292,12 @@ static HRESULT xml_get_value(xmlChar **p, xmlChar **value)
|
||||||
*p += 1;
|
*p += 1;
|
||||||
|
|
||||||
while (isspace(**p)) *p += 1;
|
while (isspace(**p)) *p += 1;
|
||||||
if (**p != '"') return XML_E_MISSINGQUOTE;
|
if (**p != '"' && **p != '\'') return XML_E_MISSINGQUOTE;
|
||||||
|
q = **p;
|
||||||
*p += 1;
|
*p += 1;
|
||||||
|
|
||||||
v = *p;
|
v = *p;
|
||||||
while (**p && **p != '"') *p += 1;
|
while (**p && **p != q) *p += 1;
|
||||||
if (!**p) return XML_E_EXPECTINGCLOSEQUOTE;
|
if (!**p) return XML_E_EXPECTINGCLOSEQUOTE;
|
||||||
len = *p - v;
|
len = *p - v;
|
||||||
if (!len) return XML_E_MISSINGNAME;
|
if (!len) return XML_E_MISSINGNAME;
|
||||||
|
|
|
@ -8608,19 +8608,15 @@ todo_wine
|
||||||
ok(hr == XML_E_BADCHARINSTRING, "got 0x%08x\n", hr);
|
ok(hr == XML_E_BADCHARINSTRING, "got 0x%08x\n", hr);
|
||||||
pi = NULL;
|
pi = NULL;
|
||||||
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding='UTF-8'"), &pi);
|
hr = IXMLDOMDocument_createProcessingInstruction(doc, _bstr_("xml"), _bstr_("version=\"1.0\" encoding='UTF-8'"), &pi);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
if (pi)
|
|
||||||
{
|
|
||||||
hr = IXMLDOMProcessingInstruction_QueryInterface(pi, &IID_IXMLDOMNode, (void **)&node);
|
hr = IXMLDOMProcessingInstruction_QueryInterface(pi, &IID_IXMLDOMNode, (void **)&node);
|
||||||
node_map = NULL;
|
node_map = NULL;
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
hr = IXMLDOMNode_get_attributes(node, &node_map);
|
hr = IXMLDOMNode_get_attributes(node, &node_map);
|
||||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||||
if (node_map) IXMLDOMNamedNodeMap_Release(node_map);
|
IXMLDOMNamedNodeMap_Release(node_map);
|
||||||
IXMLDOMNode_Release(node);
|
IXMLDOMNode_Release(node);
|
||||||
IXMLDOMProcessingInstruction_Release(pi);
|
IXMLDOMProcessingInstruction_Release(pi);
|
||||||
}
|
|
||||||
|
|
||||||
/* test for BSTR handling, pass broken BSTR */
|
/* test for BSTR handling, pass broken BSTR */
|
||||||
memcpy(&buff[2], L"test", 5 * sizeof(WCHAR));
|
memcpy(&buff[2], L"test", 5 * sizeof(WCHAR));
|
||||||
|
|
Loading…
Reference in New Issue