Opened 11 years ago
Closed 11 years ago
#11212 closed bug (fixed)
Sizzle.getText converts unbreakable space into whitespace on IE
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | attributes | Version: | 1.7.1 |
Keywords: | ie6 ie7 ie8 | Cc: | |
Blocked by: | Blocking: |
Description
There is a regression linked to changes made in Sizzle.getText. getText should make the difference between unbreakable space and whitespace.
This was working with jQuery 1.6.4.
Change History (6)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Owner: | set to cyril.fluck@… |
---|---|
Status: | new → pending |
The PR you're referencing doesn't appear to be a valid URL. Could you repost with more information?
comment:3 Changed 11 years ago by
Status: | pending → new |
---|
Here are the commits fixing this issue https://github.com/jquery/sizzle/pull/91/commits
In IE7 with jQuery 1.6.4, using getText on an element having an unbreakable space ( ) would return a string containing an unbreakable space (code 160). With jQuery 1.7.1, the same getText method replaces by a regular whitespace (code 32).
The reason is the Sizzle.getText method is using now innerText instead of nodeValue.
comment:4 Changed 11 years ago by
You can run this on IE and switch from jQuery 1.6.4 to 1.7.1 to see the different character code that is returned for the unbreakable space
comment:5 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Keywords: | ie6 ie7 ie8 added |
Milestone: | None → 1.8 |
Priority: | undecided → low |
Status: | new → open |
Another result of the 1.7 Sizzle.getText() change for oldIE.
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
This no longer applies as we no longer use innerText.
I have a fix and made a pull request https://github.com/Cyril-sf/sizzle/commit/a33fc1f47a838fb6d625eb73291205661393f2d2t