Bug 23970 - HTML parser double quote error recovery doesn't match Firefox 3.0.x
Summary: HTML parser double quote error recovery doesn't match Firefox 3.0.x
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.myoffers.co.uk/win-a-year-...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2009-02-15 18:45 PST by David Kilzer (:ddkilzer)
Modified: 2010-09-21 10:05 PDT (History)
2 users (show)

See Also:


Attachments
Reduced test case (779 bytes, text/html)
2009-02-15 18:46 PST, David Kilzer (:ddkilzer)
no flags Details
further reduced test case (99 bytes, text/html)
2009-02-15 23:19 PST, Alexey Proskuryakov
no flags Details
Patch (2.09 KB, patch)
2010-09-21 04:00 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.