Bug 23970

Summary: HTML parser double quote error recovery doesn't match Firefox 3.0.x
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
URL: http://www.myoffers.co.uk/win-a-year-free-commuting-7075-4.asp?in=1&email=geraldcornish%40googlemail%2Ecom&enpass=wfhmjq
Attachments:
Description Flags
Reduced test case
none
further reduced test case
none
Patch none

Description David Kilzer (:ddkilzer) 2009-02-15 18:45:27 PST
* SUMMARY
The page linked to in the URL is blank when loaded in Safari (WebKit) due to the way error recovery is handled for a missing double-quote character within <script></script> tags.  The same page is displayed fully in Firefox 3.0.x.

* STEPS TO REPRODUCE
1. Launch Safari/WebKit.
2. Open URL or attached test case.

* EXPECTED RESULTS
The contents of the page should be displayed.

* ACTUAL RESULTS
Nothing is displayed.

* REGRESSION
The original page and the test case both are blank in Safari 2.0.4, so this is likely not a regression.
Comment 1 David Kilzer (:ddkilzer) 2009-02-15 18:46:45 PST
Created attachment 27687 [details]
Reduced test case

Originally reported in Bug 12454 Comment #8.
Comment 2 Alexey Proskuryakov 2009-02-15 23:19:59 PST
Created attachment 27688 [details]
further reduced test case

In fact, the missing quote in JavaScript is handled correctly - it's another missing quote in <img alt="> that's causing the problem.
Comment 3 David Kilzer (:ddkilzer) 2009-02-16 05:47:43 PST
Thanks, Alexey!  Note that WebKit matches the html5lib parser <http://james.html5.org/parsetree.html>:

http://james.html5.org/cgi-bin/parsetree/parsetree.py?uri=https%3A%2F%2Fbugs.webkit.org%2Fattachment.cgi%3Fid%3D27688
Comment 4 Adam Barth 2010-09-21 04:00:27 PDT
Created attachment 68212 [details]
Patch
Comment 5 WebKit Commit Bot 2010-09-21 10:05:49 PDT
Comment on attachment 68212 [details]
Patch

Clearing flags on attachment: 68212

Committed r67962: <http://trac.webkit.org/changeset/67962>
Comment 6 WebKit Commit Bot 2010-09-21 10:05:54 PDT
All reviewed patches have been landed.  Closing bug.