WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99729
Web Inspector: Invalid Regex in SASSSourceMapping/didRequestContent, breaks Support for Sass experiment
https://bugs.webkit.org/show_bug.cgi?id=99729
Summary
Web Inspector: Invalid Regex in SASSSourceMapping/didRequestContent, breaks S...
Damir Zekić
Reported
2012-10-18 09:45:55 PDT
To reproduce the issue: 1. Create a Sass file with last rule on line 180 or further 1. Compile Sass with debug-info 3. Load a document that references compiled CSS — the feature will be broken. Even Sass files with less than 180 and more than100 lines will display wrong line numbers be wrong. It seems that the regex on the following line replaces too much: var line = parseInt(decodeURI(match[2].replace(/(..)/g, "%$1")), 10); see
http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/front-end/SASSSourceMapping.js?rev=129862#L86
The regex replaces value like "3170" with "%31%70" which decodes to "1p" whereas "170" was intended. Decoding value like "%31%83" throws URIError. A simple fix seems to be to replace "/(..)/g" with "/(.)/".
Attachments
Patch
(2.37 KB, patch)
2012-10-19 02:55 PDT
,
Alexander Pavlov (apavlov)
vsevik
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2012-10-19 02:55:37 PDT
Created
attachment 169584
[details]
Patch
Alexander Pavlov (apavlov)
Comment 2
2012-10-19 03:09:21 PDT
Committed
r131883
: <
http://trac.webkit.org/changeset/131883
>
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