Is wicket:message tag escape behaviour customizable?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Is wicket:message tag escape behaviour customizable?

Kees van Dieren
Hi,

We need the wicket:message tag to be able to escape its messages .

One of our applications uses wicket:message with an escape attribute, e.g.

        <wicket:message key="keyName" escape="true" />

A search gives a related wicket Jira issue which was resolved years ago:
https://issues.apache.org/jira/browse/WICKET-369

However in Wicket 6 the escape attribute seems to be not in use any more;
adding this attribute does not affect escaping.

Is there still a way to customize escaping of wicket:message strings?

Thanks in advance!

Best Regards,

Kees
Reply | Threaded
Open this post in threaded view
|

Re: Is wicket:message tag escape behaviour customizable?

Martin Grigorov-4
Hi,

I'm not sure why the ticket says "Fixed" but there was never such attribute
for <wicket:message> tag.
I think the default is to escape HTML.
What is the issue you try to solve ?

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

On Wed, Oct 29, 2014 at 10:01 AM, Kees van Dieren <[hidden email]>
wrote:

> Hi,
>
> We need the wicket:message tag to be able to escape its messages .
>
> One of our applications uses wicket:message with an escape attribute, e.g.
>
>         <wicket:message key="keyName" escape="true" />
>
> A search gives a related wicket Jira issue which was resolved years ago:
> https://issues.apache.org/jira/browse/WICKET-369
>
> However in Wicket 6 the escape attribute seems to be not in use any more;
> adding this attribute does not affect escaping.
>
> Is there still a way to customize escaping of wicket:message strings?
>
> Thanks in advance!
>
> Best Regards,
>
> Kees
>
Reply | Threaded
Open this post in threaded view
|

Re: Is wicket:message tag escape behaviour customizable?

Kees van Dieren-2
Hi,

Resource retrieved using wicket:message values are not escaped (verified
with Wicket 6.13).

We have build our own custom mini-cms to allow system administrators to
alter texts. Those texts are stored in database, and loaded with a
custom ComponentStringResourceLoader.

Those texts are sometimes resolved using a wicket Label with a
ResourceModel, and sometimes with wicket:message.

Label by default escapes model strings, wicket:message not.

We would like to be able to escape wicket:message resource keys as well, if
possible.

Any suggestion / workaround is welcome.

Thanks.


Best regards / Met vriendelijke groet,

Kees van Dieren
Squins IT Solutions BV
Oranjestraat 30
2983 HS Ridderkerk
The Netherlands
Mobile: +31 (0)6 30413841
www.squins.com
Chamber of commerce Rotterdam: 24435103

2014-10-29 9:39 GMT+01:00 Martin Grigorov <[hidden email]>:

> Hi,
>
> I'm not sure why the ticket says "Fixed" but there was never such attribute
> for <wicket:message> tag.
> I think the default is to escape HTML.
> What is the issue you try to solve ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Oct 29, 2014 at 10:01 AM, Kees van Dieren <[hidden email]
> >
> wrote:
>
> > Hi,
> >
> > We need the wicket:message tag to be able to escape its messages .
> >
> > One of our applications uses wicket:message with an escape attribute,
> e.g.
> >
> >         <wicket:message key="keyName" escape="true" />
> >
> > A search gives a related wicket Jira issue which was resolved years ago:
> > https://issues.apache.org/jira/browse/WICKET-369
> >
> > However in Wicket 6 the escape attribute seems to be not in use any more;
> > adding this attribute does not affect escaping.
> >
> > Is there still a way to customize escaping of wicket:message strings?
> >
> > Thanks in advance!
> >
> > Best Regards,
> >
> > Kees
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Is wicket:message tag escape behaviour customizable?

Martin Grigorov-4
On Wed, Oct 29, 2014 at 1:59 PM, Kees van Dieren <[hidden email]> wrote:

> Hi,
>
> Resource retrieved using wicket:message values are not escaped (verified
> with Wicket 6.13).
>
> We have build our own custom mini-cms to allow system administrators to
> alter texts. Those texts are stored in database, and loaded with a
> custom ComponentStringResourceLoader.
>
> Those texts are sometimes resolved using a wicket Label with a
> ResourceModel, and sometimes with wicket:message.
>
> Label by default escapes model strings, wicket:message not.
>
> We would like to be able to escape wicket:message resource keys as well, if
> possible.
>
> Any suggestion / workaround is welcome.
>

Please create a ticket with a quickstart attached.
Thanks!


>
> Thanks.
>
>
> Best regards / Met vriendelijke groet,
>
> Kees van Dieren
> Squins IT Solutions BV
> Oranjestraat 30
> 2983 HS Ridderkerk
> The Netherlands
> Mobile: +31 (0)6 30413841
> www.squins.com
> Chamber of commerce Rotterdam: 24435103
>
> 2014-10-29 9:39 GMT+01:00 Martin Grigorov <[hidden email]>:
>
> > Hi,
> >
> > I'm not sure why the ticket says "Fixed" but there was never such
> attribute
> > for <wicket:message> tag.
> > I think the default is to escape HTML.
> > What is the issue you try to solve ?
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Oct 29, 2014 at 10:01 AM, Kees van Dieren <
> [hidden email]
> > >
> > wrote:
> >
> > > Hi,
> > >
> > > We need the wicket:message tag to be able to escape its messages .
> > >
> > > One of our applications uses wicket:message with an escape attribute,
> > e.g.
> > >
> > >         <wicket:message key="keyName" escape="true" />
> > >
> > > A search gives a related wicket Jira issue which was resolved years
> ago:
> > > https://issues.apache.org/jira/browse/WICKET-369
> > >
> > > However in Wicket 6 the escape attribute seems to be not in use any
> more;
> > > adding this attribute does not affect escaping.
> > >
> > > Is there still a way to customize escaping of wicket:message strings?
> > >
> > > Thanks in advance!
> > >
> > > Best Regards,
> > >
> > > Kees
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Is wicket:message tag escape behaviour customizable?

Kees van Dieren
Finally found time for it.

https://issues.apache.org/jira/browse/WICKET-5771

Thanks for looking into it.

2014-10-29 13:35 GMT+01:00 Martin Grigorov <[hidden email]>:

> On Wed, Oct 29, 2014 at 1:59 PM, Kees van Dieren <[hidden email]> wrote:
>
> > Hi,
> >
> > Resource retrieved using wicket:message values are not escaped (verified
> > with Wicket 6.13).
> >
> > We have build our own custom mini-cms to allow system administrators to
> > alter texts. Those texts are stored in database, and loaded with a
> > custom ComponentStringResourceLoader.
> >
> > Those texts are sometimes resolved using a wicket Label with a
> > ResourceModel, and sometimes with wicket:message.
> >
> > Label by default escapes model strings, wicket:message not.
> >
> > We would like to be able to escape wicket:message resource keys as well,
> if
> > possible.
> >
> > Any suggestion / workaround is welcome.
> >
>
> Please create a ticket with a quickstart attached.
> Thanks!
>
>
> >
> > Thanks.
> >
> >
> > Best regards / Met vriendelijke groet,
> >
> > Kees van Dieren
> > Squins IT Solutions BV
> > Oranjestraat 30
> > 2983 HS Ridderkerk
> > The Netherlands
> > Mobile: +31 (0)6 30413841
> > www.squins.com
> > Chamber of commerce Rotterdam: 24435103
> >
> > 2014-10-29 9:39 GMT+01:00 Martin Grigorov <[hidden email]>:
> >
> > > Hi,
> > >
> > > I'm not sure why the ticket says "Fixed" but there was never such
> > attribute
> > > for <wicket:message> tag.
> > > I think the default is to escape HTML.
> > > What is the issue you try to solve ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Oct 29, 2014 at 10:01 AM, Kees van Dieren <
> > [hidden email]
> > > >
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > We need the wicket:message tag to be able to escape its messages .
> > > >
> > > > One of our applications uses wicket:message with an escape attribute,
> > > e.g.
> > > >
> > > >         <wicket:message key="keyName" escape="true" />
> > > >
> > > > A search gives a related wicket Jira issue which was resolved years
> > ago:
> > > > https://issues.apache.org/jira/browse/WICKET-369
> > > >
> > > > However in Wicket 6 the escape attribute seems to be not in use any
> > more;
> > > > adding this attribute does not affect escaping.
> > > >
> > > > Is there still a way to customize escaping of wicket:message strings?
> > > >
> > > > Thanks in advance!
> > > >
> > > > Best Regards,
> > > >
> > > > Kees
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Is wicket:message tag escape behaviour customizable?

Kees van Dieren
Also fixed the issue: wicket:message tag now supports escape attribute.
Patch attached to the issue.


2014-11-20 21:02 GMT+01:00 Kees van Dieren <[hidden email]>:

> Finally found time for it.
>
> https://issues.apache.org/jira/browse/WICKET-5771
>
> Thanks for looking into it.
>
> 2014-10-29 13:35 GMT+01:00 Martin Grigorov <[hidden email]>:
>
>> On Wed, Oct 29, 2014 at 1:59 PM, Kees van Dieren <[hidden email]> wrote:
>>
>> > Hi,
>> >
>> > Resource retrieved using wicket:message values are not escaped (verified
>> > with Wicket 6.13).
>> >
>> > We have build our own custom mini-cms to allow system administrators to
>> > alter texts. Those texts are stored in database, and loaded with a
>> > custom ComponentStringResourceLoader.
>> >
>> > Those texts are sometimes resolved using a wicket Label with a
>> > ResourceModel, and sometimes with wicket:message.
>> >
>> > Label by default escapes model strings, wicket:message not.
>> >
>> > We would like to be able to escape wicket:message resource keys as
>> well, if
>> > possible.
>> >
>> > Any suggestion / workaround is welcome.
>> >
>>
>> Please create a ticket with a quickstart attached.
>> Thanks!
>>
>>
>> >
>> > Thanks.
>> >
>> >
>> > Best regards / Met vriendelijke groet,
>> >
>> > Kees van Dieren
>> > Squins IT Solutions BV
>> > Oranjestraat 30
>> > 2983 HS Ridderkerk
>> > The Netherlands
>> > Mobile: +31 (0)6 30413841
>> > www.squins.com
>> > Chamber of commerce Rotterdam: 24435103
>> >
>> > 2014-10-29 9:39 GMT+01:00 Martin Grigorov <[hidden email]>:
>> >
>> > > Hi,
>> > >
>> > > I'm not sure why the ticket says "Fixed" but there was never such
>> > attribute
>> > > for <wicket:message> tag.
>> > > I think the default is to escape HTML.
>> > > What is the issue you try to solve ?
>> > >
>> > > Martin Grigorov
>> > > Wicket Training and Consulting
>> > > https://twitter.com/mtgrigorov
>> > >
>> > > On Wed, Oct 29, 2014 at 10:01 AM, Kees van Dieren <
>> > [hidden email]
>> > > >
>> > > wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > We need the wicket:message tag to be able to escape its messages .
>> > > >
>> > > > One of our applications uses wicket:message with an escape
>> attribute,
>> > > e.g.
>> > > >
>> > > >         <wicket:message key="keyName" escape="true" />
>> > > >
>> > > > A search gives a related wicket Jira issue which was resolved years
>> > ago:
>> > > > https://issues.apache.org/jira/browse/WICKET-369
>> > > >
>> > > > However in Wicket 6 the escape attribute seems to be not in use any
>> > more;
>> > > > adding this attribute does not affect escaping.
>> > > >
>> > > > Is there still a way to customize escaping of wicket:message
>> strings?
>> > > >
>> > > > Thanks in advance!
>> > > >
>> > > > Best Regards,
>> > > >
>> > > > Kees
>> > > >
>> > >
>> >
>>
>
>