[ 
https://issues.apache.org/jira/browse/WICKET-5242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13688188#comment-13688188
 ] 

Bertrand Guay-Paquet commented on WICKET-5242:
----------------------------------------------

I found this:
http://www.w3.org/html/wg/drafts/html/master/dom.html#attributes

"Except where otherwise specified, attributes on HTML elements may have any 
string value, including the empty string. Except where explicitly stated, there 
is no restriction on what text can be specified in such attributes."

Also, a related stack overflow question with more discussion:
http://stackoverflow.com/questions/4699276/can-data-attribute-contain-html-tags
                
> Disable escaping of html tag attributes
> ---------------------------------------
>
>                 Key: WICKET-5242
>                 URL: https://issues.apache.org/jira/browse/WICKET-5242
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.7.0
>            Reporter: Bertrand Guay-Paquet
>              Labels: escaping, html, tags
>
> Currently, all component tag attributes are escaped.With html5 data- 
> attributes, much more values can be considered valid depending on the tag 
> attribute and some should not be escaped.
> For example, bootstrap tooltips use the "data-title" attribute to set the 
> content of a tooltip. Using Wicket's tag attributes, it's not possible to set 
> the value "<b>hello world</b>" as the data-title since it is escaped.
> ComponentTag#writeOutput() is the method which calls 
> Strings.escapeMarkup(value); and escapes tag values. This is called by 
> Component#renderComponentTag().
> There should be a way to disable component tag escaping either per-tag or 
> per-component.
> Reference email thread:
> http://apache-wicket.1842946.n4.nabble.com/AttributeModifier-with-html-in-the-attribute-tp4659206.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to