Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338415

Summary: HTML5 attribute validator ignores data- attributes contributed by modelquery extension
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
Component: wst.htmlAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: thatnitind
Version: 3.2.3Flags: nsand.dev: review-
Target Milestone: 3.2.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
none
additional patch none

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.