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)
Change History (4)
Changed November 11, 2009 01:05PM UTC by comment:1
Changed November 11, 2009 01:05PM UTC by comment:2
component: | unfilled → core |
---|---|
need: | Review → Patch |
Changed November 11, 2009 01:07PM UTC by comment:3
HTML output of the test case:
<div><div>hello1</div></div> <div>x<div>hello2</div></div> <div> <div>hello2</div></div>
Changed November 11, 2009 07:24PM UTC by comment:4
milestone: | → 1.4 |
---|---|
resolution: | → fixed |
status: | new → closed |
version: | → 1.3.2 |
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.