WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
67154
UIWebView: Inconsistent Regular Expression Processing
https://bugs.webkit.org/show_bug.cgi?id=67154
Summary
UIWebView: Inconsistent Regular Expression Processing
mdakin
Reported
2011-08-29 14:31:01 PDT
Created
attachment 105522
[details]
Contains test HTML and Screenshots of output. Elias Zamaria has discovered a bug in the regular-expression processing of the webkit that runs inside the UIWebView on an iPhone 4 running iOS 4.3.3 (8J2). The user-agent string of such a UIWebView is: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8J2 The bug presents in the following manner: iOS 4.3.3 UIWebView: PRESENTS: iOS-4_3_3-UIWebView.png iOS 4.3.3 Safari: DOES NOT PRESENT: iOS-4_3_3-Safari.png MacOS Safari 5.1 (6534.50): DOES NOT PRESENT: MacOS-Safari-5_1.jpg We believe the iOS 4.3.3 UIWebView case to be INCORRECT output. Whereas the other cases are correct. Steps to reproduce: Load
http://eliasz.net/regexTest.html
using a UIWebView. Alternatively, regexTest.html can be found in the zipfile attached to this bug. To be explicit, the test code is this: <!DOCTYPE html> <html><head> <title>regex test</title> </head> <body> <div id="test"></div> <script>document.getElementById("test").innerText = "stuff/oldSubstr".replace(/[^\/]*?$/, "replacement");</script> </body></html> It is expected that "oldSubstr" be replaced with "replacement." This does not happen in the UIWebView case (the replacement string is instead appended to the end). All of the above-mentioned files have all been incorporated into the attached regexTest.zip. Could this bug be related to:
https://bugs.webkit.org/show_bug.cgi?id=23121
?
Attachments
Contains test HTML and Screenshots of output.
(97.26 KB, application/zip)
2011-08-29 14:31 PDT
,
mdakin
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-08-29 15:37:05 PDT
Please don't report iOS specific bugs here,
http://bugreport.apple.com
is the correct place for that.
Geoffrey Garen
Comment 2
2011-08-29 18:51:53 PDT
Even though this report is ostensibly about UIWebView, I suspect it comes down to a bug in JavaScriptCore's regular expression interpreter. My guess is that the same bug is reproducible on PPC in Safari, too, or if you modify the expression to add complex capturing. Anyone out there have a PPC box they can test with? :)
Geoffrey Garen
Comment 3
2011-08-29 18:57:43 PDT
<
rdar://problem/10043693
>
Gavin Barraclough
Comment 4
2012-03-11 14:48:27 PDT
This bug should be fixed in iOS 5.0 or later, please reopen if you can still reproduce this issue. thanks!, G.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug