Opened 11 years ago
Closed 11 years ago
#10913 closed bug (invalid)
jQuery.html() - removes double spaces on IE7 and IE8
Reported by: | Agnius101 | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | manipulation | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
- Set html value with double spaces:
$("#list").html('<li>List item with double spaces.</li>');
- Get html value:
$("#list").html();
- html() function returns value without double spaces on IE7 and IE8, while it returns expected value on IE9, FF and Chrome.
See example on and check console output: http://jsfiddle.net/L6zq6/1/
Change History (1)
comment:1 Changed 11 years ago by
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
This is not a jQuery issue. Using
alert( document.getElementById("list").innerHTML );
alerts the same thing on IE7/8You could of course use
<pre>
or CSSwhite-space: pre
to keep the whitespace. You could also replace the whitespace with the whitespace entitity