Bug 43440 - <noscript> is not allowed inside <p>
Summary: <noscript> is not allowed inside <p>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL: http://i.imgur.com/rQSRl.png
Keywords:
: 51254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-03 12:33 PDT by Mathias Bynens
Modified: 2010-12-17 08:09 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.27 KB, patch)
2010-08-05 12:34 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 Mathias Bynens 2010-08-03 12:33:11 PDT
Here's a "demo" page where the issue occurs: http://jsperf.com/slugs Note that this document validates as HTML5.

I wasn't sure what to do with this, so I asked #whatwg: http://krijnhoetmer.nl/irc-logs/whatwg/20100803#l-952

# [21:20] <Matjas> What is up with this? Web Inspector gives the following error: "<noscript> is not allowed inside <p>" Screenshot: http://i.imgur.com/rQSRl.png  
# [21:21] <Matjas> But the HTML validates and everything… Is this is a Webkit bug or am I doing something wrong?  
# [21:21] <annevk5> sounds like a WebKit bug  
# [21:23] <Matjas> annevk5: http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.3.1 says "<!ELEMENT NOSCRIPT - - (%block;)+ "  
# [21:23] <Matjas> (That's from HTML4 though)  
# [21:24] <annevk5> HTML4 does not seem relevant  
# [21:24] <annevk5> and that does not tell anything about what <p> allows  
# [21:24] <annevk5> though I guess if <noscript> just allows %block; <p> does not allow <noscript>  
# [21:24] <annevk5> but still a bug in WebKit
Comment 1 Mathias Bynens 2010-08-03 12:47:32 PDT
Cross-posted on crbug.com, as recommended by Paul Irish: http://code.google.com/p/chromium/issues/detail?id=51085
Comment 2 Alexey Proskuryakov 2010-08-04 05:54:45 PDT
I can reproduce this with both Safari/WebKit 5 and ToT. Indeed, this seems to be something HTML4 didn't allow.
Comment 3 Adam Barth 2010-08-04 09:43:02 PDT
This is likely to get fixed today or tomorrow when we turn on the HTML5 tree builder.
Comment 4 Peter Beverloo 2010-08-05 03:52:28 PDT
I can confirm Adam's comment, the error no longer appears.
Comment 5 Adam Barth 2010-08-05 09:38:18 PDT
Great!
Comment 6 Alexey Proskuryakov 2010-08-05 11:44:22 PDT
Adam, do we want to make and land a regression test?
Comment 7 Adam Barth 2010-08-05 11:46:47 PDT
I believe this case is already tested in the html5lib test suite, but we can add another test if you want to be sure.
Comment 8 Adam Barth 2010-08-05 12:31:41 PDT
Reopening to add a test.
Comment 9 Adam Barth 2010-08-05 12:34:31 PDT
Created attachment 63619 [details]
Patch
Comment 10 WebKit Commit Bot 2010-08-06 05:13:54 PDT
Comment on attachment 63619 [details]
Patch

Clearing flags on attachment: 63619

Committed r64838: <http://trac.webkit.org/changeset/64838>
Comment 11 WebKit Commit Bot 2010-08-06 05:14:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Mathias Bynens 2010-12-17 08:09:48 PST
*** Bug 51254 has been marked as a duplicate of this bug. ***