Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
47d2f3ca
Commit
47d2f3ca
authored
Nov 12, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Disable text data escaping for format nodes set with put_data().
parent
f9ab8dab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
5 deletions
+44
-5
domdoc.c
dlls/msxml3/tests/domdoc.c
+29
-5
text.c
dlls/msxml3/text.c
+15
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
47d2f3ca
...
...
@@ -12185,6 +12185,9 @@ static void test_put_data(void)
WCHAR
buff
[
100
],
*
data
;
IXMLDOMDocument
*
doc
;
DOMNodeType
*
type
;
IXMLDOMText
*
text
;
IXMLDOMNode
*
node
;
VARIANT
v
;
BSTR
get_data
;
HRESULT
hr
;
...
...
@@ -12199,9 +12202,6 @@ static void test_put_data(void)
type
=
put_data_types
;
while
(
*
type
!=
NODE_INVALID
)
{
IXMLDOMNode
*
node
;
VARIANT
v
;
V_VT
(
&
v
)
=
VT_I2
;
V_I2
(
&
v
)
=
*
type
;
...
...
@@ -12213,8 +12213,6 @@ static void test_put_data(void)
{
case
NODE_TEXT
:
{
IXMLDOMText
*
text
;
hr
=
IXMLDOMNode_QueryInterface
(
node
,
&
IID_IXMLDOMText
,
(
void
**
)
&
text
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IXMLDOMText_put_data
(
text
,
data
);
...
...
@@ -12284,6 +12282,32 @@ static void test_put_data(void)
type
++
;
}
/* \r\n sequence is never escaped */
V_VT
(
&
v
)
=
VT_I2
;
V_I2
(
&
v
)
=
NODE_TEXT
;
hr
=
IXMLDOMDocument_createNode
(
doc
,
v
,
_bstr_
(
"name"
),
NULL
,
&
node
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IXMLDOMNode_QueryInterface
(
node
,
&
IID_IXMLDOMText
,
(
void
**
)
&
text
);
hr
=
IXMLDOMText_put_data
(
text
,
_bstr_
(
"
\r\n
"
));
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IXMLDOMText_get_data
(
text
,
&
get_data
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
!
lstrcmpW
(
get_data
,
_bstr_
(
"
\n
"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
get_data
));
SysFreeString
(
get_data
);
hr
=
IXMLDOMText_get_xml
(
text
,
&
get_data
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
get_data
,
_bstr_
(
"
\r\n
"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
get_data
));
SysFreeString
(
get_data
);
IXMLDOMText_Release
(
text
);
IXMLDOMNode_Release
(
node
);
IXMLDOMDocument_Release
(
doc
);
free_bstrs
();
}
...
...
dlls/msxml3/text.c
View file @
47d2f3ca
...
...
@@ -26,6 +26,7 @@
#include <stdarg.h>
#ifdef HAVE_LIBXML2
# include <libxml/parser.h>
# include <libxml/parserInternals.h>
# include <libxml/xmlerror.h>
#endif
...
...
@@ -55,6 +56,11 @@ static inline domtext *impl_from_IXMLDOMText( IXMLDOMText *iface )
return
CONTAINING_RECORD
(
iface
,
domtext
,
IXMLDOMText_iface
);
}
static
void
domtext_reset_noenc
(
domtext
*
This
)
{
This
->
node
.
node
->
name
=
NULL
;
}
static
HRESULT
WINAPI
domtext_QueryInterface
(
IXMLDOMText
*
iface
,
REFIID
riid
,
...
...
@@ -182,6 +188,7 @@ static HRESULT WINAPI domtext_put_nodeValue(
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
value
));
domtext_reset_noenc
(
This
);
return
node_put_value
(
&
This
->
node
,
&
value
);
}
...
...
@@ -371,6 +378,7 @@ static HRESULT WINAPI domtext_put_text(
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
domtext_reset_noenc
(
This
);
return
node_put_text
(
&
This
->
node
,
p
);
}
...
...
@@ -608,7 +616,14 @@ static HRESULT WINAPI domtext_put_data(
BSTR
data
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
static
WCHAR
rnW
[]
=
{
'\r'
,
'\n'
,
0
};
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
data
));
if
(
data
&&
!
strcmpW
(
rnW
,
data
))
This
->
node
.
node
->
name
=
xmlStringTextNoenc
;
else
domtext_reset_noenc
(
This
);
return
node_set_content
(
&
This
->
node
,
data
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment