Side navigation
#4457 closed bug (invalid)
Opened March 31, 2009 10:48AM UTC
Closed May 16, 2009 02:04AM UTC
text() with XML parsing is not working correctly in IE6/7
Reported by: | rlejsza | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | text text() xml ie6 ie7 | Cc: | |
Blocked by: | Blocking: |
Description
When text() function is called for string without html(xml) tags in it, in IE6/7 is returning wrong value.
Not affected: IE8 (also with IE7 compatibility mode), FF3, Opera 9.
How to reproduce:
var data = "<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?><string xmlns=\\"http://192.168.2.3:81/WebService.asmx\\">TEXT</string> ";
var ret = $(data).text();
alert(ret);
How to correct:
var data = "<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?><string xmlns=\\"http://192.168.2.3:81/WebService.asmx\\"><a>TEXT</a></string> ";
var ret = $(data).text();
alert(ret);
Attachments (0)
Change History (1)
Changed May 16, 2009 02:04AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
You cannot pass xml to the $(html) constructor. See the documentation:
http://docs.jquery.com/Core/jQuery#htmlownerDocument