Bug 148855

Summary: Script element with an empty for or event attributes should not execute
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, esprehn+autocc, ggaren, kangil.han, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 150335    
Attachments:
Description Flags
Patch none

Ryosuke Niwa
Reported 2015-09-04 17:04:00 PDT
See https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script When a script element has "for" or "event" attributes, we should not execute the script as a result of step 12. This bug was found by the newly added test: LayoutTests/http/tests/w3c/html/semantics/scripting-1/the-script-element/script-for-event.html
Attachments
Patch (3.66 KB, patch)
2015-10-16 15:32 PDT, Chris Dumez
no flags
Radar WebKit Bug Importer
Comment 1 2015-09-04 17:05:45 PDT
Chris Dumez
Comment 2 2015-10-16 15:32:29 PDT
Darin Adler
Comment 3 2015-10-18 15:54:43 PDT
Comment on attachment 263342 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263342&action=review > Source/WebCore/dom/ScriptElement.cpp:372 > forAttribute = forAttribute.stripWhiteSpace(); Looks like this uses the wrong stripping function; should be stripLeadingAndTrailingHTMLSpaces.
WebKit Commit Bot
Comment 4 2015-10-18 16:44:33 PDT
Comment on attachment 263342 [details] Patch Clearing flags on attachment: 263342 Committed r191270: <http://trac.webkit.org/changeset/191270>
WebKit Commit Bot
Comment 5 2015-10-18 16:44:38 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.