Summary: | Contents of noscript elements turned into strings in WebArchives | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jessie Berlin <jberlin> | ||||||
Component: | Page Loading | Assignee: | Brady Eidson <beidson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | adachan, beidson, japhet, jberlin, sfalken, webkit-bug-importer, webkit.review.bot | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Jessie Berlin
2012-03-02 10:27:25 PST
When we create a WebArchive, we serialize the DOM. Since the contents of the <noscript> tag is never parsed into the DOM tree when scripting is enabled, they remain the innertext of the <noscript> tag. I agree this is weird, but is there a real world symptom? (In reply to comment #2) > When we create a WebArchive, we serialize the DOM. > > Since the contents of the <noscript> tag is never parsed into the DOM tree when scripting is enabled, they remain the innertext of the <noscript> tag. > > I agree this is weird, but is there a real world symptom? The real word symptom is odd strings appearing in webarchives that were created with JavaScript enabled, but the user has decided to look at with JavaScript disabled. There's a much deeper question about how innerHTML of <noscript> is expected to work in both a scripting and non-scripting environment that I believe Alexey is planning to pursue with the spec. But for webarchives, we can solve this by filtering out the <noscript> elements completely if scripting is enabled. Patch coming soon. Created attachment 141229 [details]
Patch v1
Comment on attachment 141229 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=141229&action=review > Source/WebCore/editing/MarkupAccumulator.h:73 > + String serializeNodes(Node* targetNode, Node* nodeToSkip, EChildrenOnly, Vector<QualifiedName>* tagNamesToSkip); You should make this new argument optional. > Source/WebCore/page/PageSerializer.cpp:217 > + String text = accumulator.serializeNodes(document->documentElement(), 0, IncludeNode, 0); You wouldn't have to change this line if the new argument to serializeNodes() were optional. |