I am having a XHTML 1.0 Strict website, so no target="_blank" attribute is allowed on links to have valid markup.
Since RTE allows to create links with target="_blank" this could break markup validation.
I am wondering how others are handling that problem? My first thought was to remove the a[target] attribute from tinyMceConfig (validElements), but if the functionality should remain, that is no option. Can I replace all occurences of target="_blank" before the page output is sent to the browser, and set a class instead in order to open in a new window by javascript/jquery?
I think it's important to remember this..."Validation is not a religion, it's a tool". Sometimes you just have to be practical and focus on the pros and cons of the approach. I must honestly say that I think it's too much work and effort to put into something that really does not matter for the user experience and has no real value for the client.
An easy way to fix it would be to simply change the doctype to <!DOCTYPE html> - That' the doctype for HTML5 that supports the XHTML syntax.
Don't get me wrong I'm all for standards and valid code but remember my quote above.
good point, thank you, but doing so, I get some other errors for the RTE generated tables:
The value of the border attribute on the table element must be either 1 or the empty string. To regulate the thickness of table borders, Use CSS instead.
The cellspacing attribute on the table element is obsolete. Use CSS instead.
The align attribute on the tr element is obsolete. Use CSS instead.
Isn't TinyMCE able yet to produce HTML5 conform output? Or can I set something on TineMCE in order to get that?
target="_blank"
Hi,
I am having a XHTML 1.0 Strict website, so no target="_blank" attribute is allowed on links to have valid markup.
Since RTE allows to create links with target="_blank" this could break markup validation.
I am wondering how others are handling that problem? My first thought was to remove the a[target] attribute from tinyMceConfig (validElements), but if the functionality should remain, that is no option. Can I replace all occurences of target="_blank" before the page output is sent to the browser, and set a class instead in order to open in a new window by javascript/jquery?
Any suggestions?
Best Regards
Andreas
Hi Andreas
I think it's important to remember this..."Validation is not a religion, it's a tool". Sometimes you just have to be practical and focus on the pros and cons of the approach. I must honestly say that I think it's too much work and effort to put into something that really does not matter for the user experience and has no real value for the client.
An easy way to fix it would be to simply change the doctype to <!DOCTYPE html> - That' the doctype for HTML5 that supports the XHTML syntax.
Don't get me wrong I'm all for standards and valid code but remember my quote above.
Just my 2 cents on the issue :)
Cheers,
Jan
Hi Jan,
good point, thank you, but doing so, I get some other errors for the RTE generated tables:
The value of the border attribute on the table element must be either 1 or the empty string. To regulate the thickness of table borders, Use CSS instead.
The cellspacing attribute on the table element is obsolete. Use CSS instead.
The align attribute on the tr element is obsolete. Use CSS instead.
Isn't TinyMCE able yet to produce HTML5 conform output? Or can I set something on TineMCE in order to get that?
Best Regards
Andreas
Cross your fingers and hold your breath for CKEditor support one day in the Umbraco back-end instead of TinyMCE!
(Sorry, I know this isn't helpful to solve your problem, but misery loves comfort?)
is working on a reply...