You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2012/11/21 16:46:02 UTC
[ANNOUNCE] Wicketstuff htmlvalidator 1.8 released
The Wicketstuff HTML Validator has been released with version 1.8.
This version includes support for HTML5 data attributes (<p
data-foo="bar">) and lang attributes. We have upgraded the HTML5
schemas to the latest available from htmlvalidator.nu (which hosts
their code on bitbucket).
Notable update: the Saxon dependency is now a compile time dependency
to mitigate a (rather well know) obscure bug with the title "Gregor
Samsa" [1].
The release is still fresh, so it might take a couple of hours before
it arrives in the central repository.
Have fun!
Emond & Martijn
[1] http://thedailywtf.com/Articles/Who_is_Gregor_Samsa_0x3f_.aspx
Changelog
=========
Upgrade whattf validator code
Fix the strange but odd Gregor Samsa bug
Add support for data- attributes
Usage
=====
Make sure you use Wicket 6.0.0 or newer. This validator does not run
on earlier versions, but is compatible with newer versions. Java 6 is
also a minimum requirement.
Add the Wicket Stuff validator to your POM as a dependency:
<dependency>
<groupId>org.wicketstuff.htmlvalidator</groupId>
<artifactId>wicketstuff-htmlvalidator</artifactId>
<version>1.8</version>
</dependency>
Depending on your setup you need to use a different scope (for example
test or provided to prevent the validator to be deployed to
production).
Add the following lines to your Application's init method:
@Override
protected void init() {
super.init();
getMarkupSettings().setStripWicketTags(true);
getRequestCycleSettings().addResponseFilter(new
HtmlValidationResponseFilter());
}
You might want to put a check for the configuration of your
application around the addition of the response filter, to ensure that
the filter doesn't run in production mode:
if (RuntimeConfigurationType.DEVELOPMENT == getConfigurationType()) {
getRequestCycleSettings().addResponseFilter(new
HtmlValidationResponseFilter());
}
License
======
This project is distributed using the Apache 2 License (see LICENSE
for more details on other included software).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org