Bug Tracker

Opened 14 years ago

Closed 14 years ago

#4457 closed bug (invalid)

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:


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=\"\">TEXT</string> ";

var ret = $(data).text();


How to correct:

var data = "<?xml version=\"1.0\" encoding=\"utf-8\"?><string xmlns=\"\"><a>TEXT</a></string> ";

var ret = $(data).text();


Change History (1)

comment:1 Changed 14 years ago by dmethvin

Resolution: invalid
Status: newclosed

You cannot pass xml to the $(html) constructor. See the documentation:


Note: See TracTickets for help on using tickets.