String.trim() strips every Unicode space character, including U+00A0
(no-break space) — which this tokenizer treats as ordinary WORD content,
not whitespace (#4946 review). Trim only the six characters isSpace
recognizes, so a selector carrying an NBSP is not silently rewritten
into a different one before it ever reaches the parser.
String.trim()strips every Unicode space character, including U+00A0 (no-break space) — which this tokenizer treats as ordinary WORD content, not whitespace (#4946 review). Trim only the six charactersisSpacerecognizes, so a selector carrying an NBSP is not silently rewritten into a different one before it ever reaches the parser.