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

ASF subversion and git services commented on WICKET-7196:
---------------------------------------------------------

Commit 39a7fd323e81b40ee91dc7db4693a54c0bdfaa83 in wicket's branch 
refs/heads/WICKET-7196 from Emond Papegaaij
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=39a7fd323e ]

WICKET-7196 Let a wicket:label tag turn off escaping

The label text <wicket:label> takes from a model or from a resource bundle is
escaped where it is written, and the flag that decides it is read from the
TextLabel the resolver inserts. That component is never handed to the
application, so its flag stays at the default and nothing can clear it. An
application whose bundle holds markup, or an entity such as Save &amp; close,
had no way back other than moving the content into the tag body.

The tag now carries the decision. An escape attribute sets escapeModelStrings on
the label the resolver creates, so the write site is unchanged and the attribute
is the markup spelling of the flag the security model already describes: 
clearing
it is the application saying the content is markup and taking responsibility for
it.

A missing attribute keeps the escaping, and so does an empty one. That differs
from <wicket:message>, which reads the same attribute with IValueMap#getBoolean
and resolves an empty value to false. There false is the default, here it is the
opt-out, so an empty value has to keep the escaping rather than quietly drop it.
An unrecognised value still fails, the way it does on <wicket:message>.

The attribute says nothing about the tag body. That body is markup the label has
just rendered itself, nested components and <wicket:message> included, and is
written as is either way.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>


> Allow unescaped wicket:label tags
> ---------------------------------
>
>                 Key: WICKET-7196
>                 URL: https://issues.apache.org/jira/browse/WICKET-7196
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-core
>    Affects Versions: 9.23.0, 10.10.0
>            Reporter: Emond Papegaaij
>            Priority: Major
>
> wicket:label tags get their content escaped. This is usually fine, but we 
> should allow disabling this via an escape="false" attribute (very similar to 
> the escape="true" on wicket:message).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to