Ticket #4980 (closed bug: fixed)
Character 160 ("Non-breaking space") not removed using trim() in Internet Explorer
|Reported by:||aakoch||Owned by:|
If a string contains the "Non-breaking space" character (char code 160), Internet Explorer and Safari won't see that as a white-space character and the trim() method won't strip the character from the string.
Here's a small write-up about it: http://www.adamkoch.com/2009/07/25/white-space-and-character-160/
Here's a test page: http://www.adamkoch.com/char160test.html Both trim methods should return an empty string.
A fix could be to add the character to the trim method's regular expression: