Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338415 - HTML5 attribute validator ignores data- attributes contributed by modelquery extension
Summary: HTML5 attribute validator ignores data- attributes contributed by modelquery ...
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.html (show other bugs)
Version: 3.2.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.4   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 09:26 EST by Nick Sandonato CLA
Modified: 2011-09-20 16:07 EDT (History)
1 user (show)

See Also:
nsand.dev: review-


Attachments
patch (2.22 KB, patch)
2011-02-28 09:29 EST, Nick Sandonato CLA
no flags Details | Diff
additional patch (1.57 KB, patch)
2011-09-20 15:23 EDT, Nitin Dahyabhai CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Sandonato CLA 2011-02-28 09:26:28 EST
The HTML attribute validator, which accounts for data- attributes, does not validate the attribute's value when the attribute is contributed via modelquery extension. A data- attribute should be validated if it's contributed via MQE.
Comment 1 Nick Sandonato CLA 2011-02-28 09:29:58 EST
Created attachment 189943 [details]
patch
Comment 2 Nick Sandonato CLA 2011-03-02 10:27:08 EST
Code checked in.
Comment 3 Nitin Dahyabhai CLA 2011-09-20 15:22:45 EDT
Patch doesn't check for an HTML5 document.
Comment 4 Nitin Dahyabhai CLA 2011-09-20 15:23:18 EDT
Created attachment 203706 [details]
additional patch
Comment 5 Nick Sandonato CLA 2011-09-20 15:43:49 EDT
I understand the need for this, but HTML documents have the potential to have no doctype. I would recommend using the DocumentTypeAdapter for the ownerDocument and use hasFeature(HTMLDocumentTypeConstants.HTML5) to check if the document is HTML5. This gives the added benefit of adhering to the Web Content Settings.
Comment 6 Nitin Dahyabhai CLA 2011-09-20 16:07:36 EDT
Corrected based on Nick's feedback and committed to 3.2.5, 3.3.2, and HEAD.