WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
25624
REGRESSION(
r33963
-
r33980
): Function.toString preserves quote style, but it shouldn't
https://bugs.webkit.org/show_bug.cgi?id=25624
Summary
REGRESSION(r33963-r33980): Function.toString preserves quote style, but it sh...
jasneet
Reported
2009-05-07 12:08:31 PDT
I Steps: Go to
http://www.greenmountaininn.com/?gclid=CMHY_rPpv5UCFQZqswodsj4hQg
II Issue: Javascript code seen instead of normal content III Conclusion: The way single and double quotes are interpreted when one type of quotes are within another. Line sd+="<div style='"+rt+"'>"; is causing the issue. IV Other Browsers: IE7: ok FF3: ok V Nightly tested: 43092 Bug in Chromium :
http://code.google.com/p/chromium/issues/detail?id=696
Attachments
reduced testcase
(777 bytes, text/html)
2009-05-07 12:08 PDT
,
jasneet
no flags
Details
further reduced test case
(142 bytes, text/html)
2009-05-12 07:50 PDT
,
Alexey Proskuryakov
no flags
Details
fix
(5.48 KB, patch)
2011-01-28 15:16 PST
,
chris reiss
ggaren
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
jasneet
Comment 1
2009-05-07 12:08:51 PDT
Created
attachment 30107
[details]
reduced testcase
Alexey Proskuryakov
Comment 2
2009-05-08 13:30:06 PDT
This is a regression from Safari 3.
Alexey Proskuryakov
Comment 3
2009-05-08 13:30:52 PDT
<
rdar://problem/6870599
>
Alexey Proskuryakov
Comment 4
2009-05-12 07:50:12 PDT
Created
attachment 30228
[details]
further reduced test case
Alexey Proskuryakov
Comment 5
2009-05-12 07:53:10 PDT
This is a regression in how Function.toString() prints string literals - previously, double quotes were always used, matching Firefox - but now, the original style of quotes is preserved.
David Kilzer (:ddkilzer)
Comment 6
2009-05-14 06:55:04 PDT
Internal autospade tool reports: Works:
r33963
Fails:
r33980
chris reiss
Comment 7
2011-01-25 13:57:20 PST
starting on this ...
chris reiss
Comment 8
2011-01-28 15:16:55 PST
Created
attachment 80505
[details]
fix added a conversion function for this - hopefully in the right place and not too much wheel reinvention.
WebKit Review Bot
Comment 9
2011-01-28 15:19:48 PST
Attachment 80505
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1 Source/JavaScriptCore/runtime/FunctionPrototype.cpp:76: Extra space before ) in for [whitespace/parens] [5] Source/JavaScriptCore/runtime/FunctionPrototype.cpp:85: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/JavaScriptCore/runtime/FunctionPrototype.cpp:84: Missing space before ( in switch( [whitespace/parens] [5] Source/JavaScriptCore/runtime/FunctionPrototype.cpp:87: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/JavaScriptCore/runtime/FunctionPrototype.cpp:86: Missing space before ( in switch( [whitespace/parens] [5] Source/JavaScriptCore/runtime/FunctionPrototype.cpp:107: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Source/JavaScriptCore/runtime/FunctionPrototype.cpp:106: Missing space before ( in switch( [whitespace/parens] [5] Total errors found: 7 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 10
2011-01-28 15:29:35 PST
Chris, I'm glad you made the effort to fix this, and I hate to say it, but do we really want to make this change? It looks like the website this was reported against has since been fixed, and we've had no reports of this bug at other websites. I'd prefer not to go through contortions in JavaScriptCore to maintain compatibility with a poorly coded website that doesn't exist anymore. In general, we made a choice a few years ago not to decompile or specially contort JavaScript in Function.prototype.toString. We just return the original string provided in source code. A bug or two has cropped up here and there from poorly coded websites, but we haven't seen one that justified going back on our strategy yet.
Gavin Barraclough
Comment 11
2011-08-23 14:43:43 PDT
I don't think we intend to change our current behavior here. This website has fixed its content, I don't think we are aware of further compatibility issues, and it is not clear that additional processing of the source is a good idea. Since neither the spec nor web compatibility require us to do this, I think the bug is probably invalid, but it seems clear to be at least won't fix.
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