Thymeleaf uses a SAX XML parser for rendering the markup. The SAX parser escapes XML entities during the rendering process as required by the XML standard. 
coded by you therefore gets rendered as 
. Since this behaviour is required by the XML standard, Thymeleaf does not provide any way to control this behaviour through configuration (nor can it be controlled on the underlying Xerces parser).
The relevant code is in the Thymeleaf class AbstractGeneralTemplateWriter
which is subclassed by XhtmlHtml5TemplateWriter
. Look for the line writer.write(DOMUtils.escapeXml(attrValue, true));
in AbstractGeneralTemplateWriter
. You can wrap this line in a condition such that it is called only for non-HTML5 attributes (that is, those that do not start with data-
). Although the generated markup would still be invalid XML, this should not be a problem practically because browsers will not have a problem with unescaped XML entities.
Note: This suggestion is based on Thymeleaf version 2.1.2, which is the latest available version as of 26-Apr-2014.