Skip to main content

Bug Tracker

Side navigation

#5483 closed bug (fixed)

Opened November 10, 2009 06:51PM UTC

Closed November 11, 2009 07:24PM UTC

Another Result in .html() with \\r\\n at the beginning (1.4pre)

Reported by: Sebmaster Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

If you call .html('</body>\\r\\n</html>') on an div for example, you get a different value, than with .html('\\r\\n</body>\\r\\n</html>'). In jQuery 1.3.2, this isn't the case.

.html('\\r\\n</body>\\r\\n</html>')

FF 3.5.5 + jQ 1.4pre => </body></html>

FF 3.5.5 + jQ 1.3.2 => </body></html>

IE 8 + jQ 1.4pre => </body></html>

IE 8 + jQ 1.3.2 => </body></html>

I included the test case.

Attachments (2)
  • test-5483.html (0.4 KB) - added by dmethvin November 11, 2009 01:05PM UTC.

    Updated test case showing problem with leading spaces

  • test.htm (0.3 KB) - added by Sebmaster November 10, 2009 06:52PM UTC.

    Test Case

Change History (4)

Changed November 11, 2009 01:05PM UTC by dmethvin comment:1

The string passed to .html() should have matched tags, be able to be placed inside the <div> element that's used to convert it to DOM elements, and be valid for the doctype of the document. I updated the test case to reflect that and the problem is still there. It only seems to happen with leading spaces.

Changed November 11, 2009 01:05PM UTC by dmethvin comment:2

component: unfilledcore
need: ReviewPatch

Changed November 11, 2009 01:07PM UTC by dmethvin comment:3

HTML output of the test case:

<div><div>hello1</div></div>
<div>x<div>hello2</div></div>
<div> &lt;div&gt;hello2&lt;/div&gt;</div>

Changed November 11, 2009 07:24PM UTC by john comment:4

milestone: → 1.4
resolution: → fixed
status: newclosed
version: → 1.3.2