Hi,

AFAIK you cannot tell Wicket's default parser to run in non-strict mode.
But you can register your own IMarkupFilter that will be used before the
markup is passed to the parser.  There you can fix the markup however you
find appropriate.
See org.apache.wicket.markup.parser.filter.OpenCloseTagExpander and other
classes in the same package for inspiration.
See org.apache.wicket.markup.parser.filter.HtmlProblemFinder javadoc for
demo code how to setup it.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Nov 12, 2014 at 3:19 PM, Christian Smolka <
[email protected]> wrote:

> Hi everybody!
>
> I have a problem with the AbstractMarkupParser.
>
> My application uses a HTML template to nest itself into a given web
> site. This template is been pulled from a CMS. Sometimes, this CMS does
> not return 100% compliant HTML5, although the doctype claims it.
> Recently it returned an empty data attribute without the equal sign and
> the quotes (so it was just <tag data></tag> instead of <tag
> data=""></tag>). This made the Wicket application to crash, because it
> wasn't able to parse the template.
>
> Is there any way to tell Wicket to "overlook" such minor HTML problems?
>
> Tanks in advace
> Christian
>
>

Reply via email to