Skip to main content

Bug Tracker

Side navigation

#11212 closed bug (fixed)

Opened January 23, 2012 07:50PM UTC

Closed June 04, 2012 05:24PM UTC

Sizzle.getText converts unbreakable space into whitespace on IE

Reported by: cyril.fluck@gmail.com Owned by: cyril.fluck@gmail.com
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.

Attachments (0)
Change History (6)

Changed January 23, 2012 07:58PM UTC by anonymous comment:1

Changed January 24, 2012 12:00PM UTC by addyosmani comment:2

owner: → cyril.fluck@gmail.com
status: newpending

The PR you're referencing doesn't appear to be a valid URL. Could you repost with more information?

Changed January 24, 2012 10:27PM UTC by cyril.fluck@gmail.com comment:3

status: pendingnew

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.

Changed January 24, 2012 10:40PM UTC by cyril.fluck@gmail.com comment:4

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

http://jsfiddle.net/PREjM/5/

Changed March 10, 2012 02:11PM UTC by dmethvin comment:5

component: unfiledattributes
keywords: → ie6 ie7 ie8
milestone: None1.8
priority: undecidedlow
status: newopen

Another result of the 1.7 Sizzle.getText() change for oldIE.

Changed June 04, 2012 05:24PM UTC by timmywil comment:6

resolution: → fixed
status: openclosed

This no longer applies as we no longer use innerText.