Opened 13 years ago
Closed 13 years ago
#5483 closed bug (fixed)
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 (6)
Changed 13 years ago by
comment:1 Changed 13 years ago by
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 13 years ago by
Attachment: | test-5483.html added |
---|
Updated test case showing problem with leading spaces
comment:2 Changed 13 years ago by
Component: | unfilled → core |
---|---|
need: | Review → Patch |
comment:3 Changed 13 years ago by
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>
comment:4 Changed 13 years ago by
Milestone: | → 1.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | → 1.3.2 |
Test Case