Can someone help me understand this commit
What is \u00A0 ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The code strips trailing and leading space characters in addition to non breaking spaces,
\u00A0is the unicode point/code/number/alias for the non breaking space. You can pop up Firebug and type it out.Further information about this character:
http://www.fileformat.info/info/unicode/char/00a0/index.htm
Edit: I just tried this code in Firebug, which checks for any matches from the generated non breaking space and it matched:
However, upon doing this in IE6 it returns
null, so IE is most likely the reason for this update.Update #2 – it looks like the removal of the caret makes this inconsistent with the previous version, because it removes not just leading and trailing spaces but spaces anywhere.
Outputs