Red Hat Bugzilla – Bug 1066001
W3C validator: Use of legacy HTML attributes not compliant with XHTML 1.0 Strict type document.
Last modified: 2014-07-29 21:56:45 EDT
Description of problem: JBoss Portal 6.1.0 produces XHTML 1.0 Strict type documents. There are some legacy html elements (i.e. target="_blank") not compatible with XHTML 1.0 Strict type document creating a non compliant markup. Version-Release number of selected component (if applicable): 6.1.0 How reproducible: Always Steps to Reproduce: 1. Login into Portal. 2. Review source code generated. 3. Validate with http://validator.w3.org/ tool. Actual results: Pages with non compliant legacy html elements. Expected results: Pages without non compliant html elements making pass a w3c validation test. Additional info:
https://github.com/gatein/gatein-portal/pull/803 was merged in upstream.
Looking at the source code of /classic/home in 6.2.0.ER2: there are still some target='_blank' occurences hidden inside exo webui JS. onclick="this.target= '_blank';return true;"
Hi Tomas, From a w3c validation perspective. Workaround to put target attribute inside "onclick" event is valid. What is not valid is to add a "target" attribute in the xhtml element.
I don't know, the workaround seems nasty. Putting it in JS is just avoiding the validation process which only checks the initial state of the doc. The user will eventually get a document that is ivalid against XHTML 1.0 Strict. Wouldn't it be better to declare XHTML 1.0 Transitional instead?