RE: Is it be possible to add a validator that checks published Web Content?

Pascal Collberg, modified 5 Years ago. New Member Posts: 7 Join Date: 5/26/15 Recent Posts
Hi, does anyone know if it would be possible to add a XHTML or HTML5 validator that checks the contents of a Web Content when you publish it in the content menu?
Our users want to be sure that the articles they create are valid against WCAG 2.1 (European law) and are asking for tools to help them fulfill this requirement.One option would be to run a check that the web content adheres to certain standards such as e.g. XHTML strict. Is this possible to add in Liferay?
thumbnail
Aston Pearl, modified 5 Years ago. Junior Member Posts: 62 Join Date: 2/4/13 Recent Posts
Definitely  .... YES. It's possible. You can use any of override options based on your business flow to have this.
Lee Jordan, modified 5 Years ago. Expert Posts: 449 Join Date: 5/26/15 Recent Posts
"override options"

Urgh. I would honestly try to avoid that and train your users to copy paste source code into a validator. Whatever you do Alloy Editor and Anti Sammy are going to conspire against your goals because the editor creates many invalid HTML blocks. You could have an "Advanced Web Content" template that uses a plain text box rather than a web content editor. That would then take away the risk of Alloy Editor messing up the content.

Also you want to be careful what version of HTML your users are actually authoring (assuming they are authoring outside of Liferay and copy pasting in). Check the doctype of the HTML Liferay is producing. It may not be a good idea to put XHTML into web content (mixing HTML and XHTML). Chrome may not care IE however will give you a very bad day