WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
24019
REGRESSION: Javascript code is visible on www.bonus.com
https://bugs.webkit.org/show_bug.cgi?id=24019
Summary
REGRESSION: Javascript code is visible on www.bonus.com
Braja
Reported
2009-02-18 20:46:08 PST
Generated java script code is visible in the page. Its not able to handle pbrowser_dom.js java script. Excluding this script it works fine.
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2009-02-18 21:40:43 PST
I'm 90% sure that this is a bug in the JS on the website rather than a problem in WebKit. The site appears to construct HTML to insert in the page by appending strings, including generating style attributes. The padding is generated as follows: for(ri in ra) rt+="padding-"+l93[ri]+":"+ra[ri]+";"; where ra is an Array instance. The page uses Mootools which extends the Array prototype to include many extra methods. This results in iterating over the array returning these extra properties: ["copy", "remove", "contains", "associate", "extend", "merge", "include", "getRandom", "getLast", "each", "test", "rgbToHex", "hexToRgb", "rgbToHsb", "hsbToRgb"] Their values are retrieved from the Array instance and converted to a string, resulting in "function copy(..) { .... }" being included as part of the style. This code is eventually written to the page using document.write. The quotes used for strings within the JS function that ends up as part of the style are the same type as is used to enclose the style attribute itself, meaning that an attribute is ended and the string becomes the content of the element.
Gavin Sherlock
Comment 2
2009-02-19 08:05:30 PST
The behavior has changed since Safari 3.2.1 (where the page looks fine) and
r41018
, so this should at least be marked as a regression. It works fine in Firefox too.
Gavin Sherlock
Comment 3
2009-02-19 08:31:40 PST
The furthest build back that I'm able to test (
r37300
) shows the same regressed behavior. Either it's a regression, or there is some user agent specific code path that does the wrong thing with webkit nightlies. I can't test earlier builds due to
bug 23342
which is a WONTFIX.
Alexey Proskuryakov
Comment 4
2009-02-20 03:49:48 PST
Regression->P1.
Alexey Proskuryakov
Comment 5
2009-02-20 03:50:57 PST
<
rdar://problem/6607026
>
Braja
Comment 6
2009-02-21 01:30:38 PST
(In reply to
comment #0
)
> Generated java script code is visible in the page. Its not able to handle > pbrowser_dom.js java script. Excluding this script it works fine. >
This was not observed in 3.0 but after java script implementation change this is observed.
Jon Honeycutt
Comment 7
2009-02-23 13:56:06 PST
This works for me. It might've been fixed by a site change. Please reopen if you still see it.
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