Opened 12 years ago
Closed 12 years ago
#8923 closed bug (worksforme)
IE $.trim (non-breaking spaces)
Reported by: | anonymous | Owned by: | anonymous |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | core | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.trim in IE, do not remove "non-breaking spaces"
<span id="example"> Hello <b>World</b> </span> <script type="text/javascript"> var text = $("#example").text(); text = $.trim(text); document.write(text.length); </script>
Output in IE: Hello World 12
Others browsers: Hello World 11
Change History (6)
comment:1 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → high |
Status: | new → open |
comment:2 Changed 12 years ago by
There exists a unit test for this, but it uses this:
var nbsp = String.fromCharCode(160);
needless to say, IE must represent differently.
comment:4 Changed 12 years ago by
Owner: | set to anonymous |
---|---|
Status: | open → pending |
The assumption that leading/trailing spaces may be at fault may be incorrect. Can you create a test case that shows the actual text retrieved? This may be related to #3144 and not a problem with $.trim()
.
comment:5 Changed 12 years ago by
Priority: | high → low |
---|
comment:6 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | pending → closed |
OK, this example is almost exactly what was reported, and it's working in IE6/7/8 for me:
Note: See
TracTickets for help on using
tickets.
Confirmed