[Webkit-unassigned] [Bug 130184] New: String.prototype.trim removes U+200B from strings.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 13 02:58:25 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130184

           Summary: String.prototype.trim removes U+200B from strings.
           Product: WebKit
           Version: 525.x (Safari 3.2)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: lrn at google.com


In the current version of Safari on a Mac, the String.prototype.trim function removes "\u200b" characters from the string. That character is not recognized as whitespace by the ECMAScript 5 spec (or the ES6 drafts), and should not be removed.

Example code:  alert("\u200b".trim().length);  // should alert 1, actually alerts 0.

Apologies if this has been fixed in a nightly build.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list