Ticket #3144 (closed bug: fixed)
Inconsistent cross-browser results from .text() method
|Reported by:||dmethvin||Owned by:||dmethvin|
The .text() method returns different whitespace on different browsers. In the case of IE6/7, it sometimes returns no whitespace at all between adjacent text nodes, even though the corresponding .innerText result has white space.
This behavior has been in the .text() method for quite a while, so I don't think a lot of people have found it a critical problem. I would say that IE's lack of whitespace between text nodes is a bug.
The other whitespace differences might deserve some thought as well; for example, should IE's CR-LF sequences be changed to LF for consistency with the other browsers? Regardless, there will still be whitespace differences across browsers that jQuery can't control. For example, IE sometimes removes the trailing newline from text.
Sorta-related: Bug #2425
- Priority changed from minor to low
- Status changed from new to pending
- Milestone changed from 1.4.3 to 1.4.5
- Keywords needsreview added
- Status changed from pending to open
- Version changed from 1.2.6 to 1.4.4
comment:10 Changed 21 months ago by timmywil
- Status changed from open to closed
- Resolution set to fixed
comment:11 Changed 21 months ago by timmywil
- Keywords needsreview removed
- Component changed from core to selector
- Milestone changed from 1.next to 1.7