Bug 10611

Summary: Test of regular expression always yields false
Product: WebKit Reporter: Mark Malone <markmalone>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap
Priority: P2 Keywords: HasReduction, InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Test Case
none
Test Case none

Mark Malone
Reported 2006-08-28 15:23:11 PDT
Given: function isRestrictedText(s) { var filter = /^[\w!#$,;=@_`~\-\^\'\.\{\}\[\]\(\)\u00C0-\uFFFF]( ?[\w!#$,;=@_`~\-\^\'\.\{\}\[\]\(\)\u00C0-\uFFFF])*$/; alert(filter.test(s)); } Legal and non-legal input values alert false.
Attachments
Test Case (860 bytes, text/html)
2006-08-28 15:24 PDT, Mark Malone
no flags
Test Case (869 bytes, text/html)
2006-08-28 15:32 PDT, Mark Malone
no flags
Mark Malone
Comment 1 2006-08-28 15:24:22 PDT
Created attachment 10287 [details] Test Case
Mark Malone
Comment 2 2006-08-28 15:25:00 PDT
Mark Malone
Comment 3 2006-08-28 15:32:32 PDT
Created attachment 10288 [details] Test Case Attached Test Case
Alexey Proskuryakov
Comment 4 2006-08-28 21:50:09 PDT
Workaround: var filter = new RegExp("^[\\w!#$,;=@_`~\\-\\^\\'\\.\\{\\}\[\\]\\(\\)\u00C0-\uFFFF]( ?[\\w!#$,;=@_`~\\-\\^\\'\\.\\{\\}\\[\\]\\(\\)\u00C0-\uFFFF])*$"); *** This bug has been marked as a duplicate of 7253 ***
Note You need to log in before you can comment on or make changes to this bug.