You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Francois Meillet <fr...@gmail.com> on 2016/06/08 09:50:37 UTC

MetaDataHeaderItem # generateString()

Hi Wicket Devs,

I think MetaDataHeaderItem # generateString() should return specials characters escaped like 
StringEscapeUtils.escapeHtml(s) does.

Apache Wicket 7.3.0 - MetaDataHeaderItem  - Line 126 : append(JavaScriptUtils.escapeQuotes(value.toString()))
return qwerty'qwerty as qwerty\’qwerty

I would like the return to be qwerty'qwerty (for example for the metatag description).

What do you think of that ?

Thanks
François









Re: MetaDataHeaderItem # generateString()

Posted by Francois Meillet <fr...@gmail.com>.
https://issues.apache.org/jira/browse/WICKET-6178 <https://issues.apache.org/jira/browse/WICKET-6178>

François 








> Le 8 juin 2016 à 12:16, Martin Grigorov <mg...@apache.org> a écrit :
> 
> Hi Francois,
> 
> On Wed, Jun 8, 2016 at 11:50 AM, Francois Meillet <
> francois.meillet@gmail.com> wrote:
> 
>> Hi Wicket Devs,
>> 
>> I think MetaDataHeaderItem # generateString() should return specials
>> characters escaped like
>> StringEscapeUtils.escapeHtml(s) does.
>> 
>> Apache Wicket 7.3.0 - MetaDataHeaderItem  - Line 126 :
>> append(JavaScriptUtils.escapeQuotes(value.toString()))
>> 
> 
> Looking at
> https://github.com/apache/wicket/blob/39fb20b112e2005dab8e17667e5a763b1d89f18e/wicket-core/src/main/java/org/apache/wicket/markup/head/MetaDataHeaderItem.java#L125-L127
> I agree that only double quotes should be escaped because only double
> quotes may end prematurely the value.
> 
> 
>> return qwerty'qwerty as qwerty\’qwerty
>> 
>> I would like the return to be qwerty'qwerty (for example for the metatag
>> description).
>> 
>> What do you think of that ?
>> 
>> Thanks
>> François
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 


Re: MetaDataHeaderItem # generateString()

Posted by Martin Grigorov <mg...@apache.org>.
Hi Francois,

On Wed, Jun 8, 2016 at 11:50 AM, Francois Meillet <
francois.meillet@gmail.com> wrote:

> Hi Wicket Devs,
>
> I think MetaDataHeaderItem # generateString() should return specials
> characters escaped like
> StringEscapeUtils.escapeHtml(s) does.
>
> Apache Wicket 7.3.0 - MetaDataHeaderItem  - Line 126 :
> append(JavaScriptUtils.escapeQuotes(value.toString()))
>

Looking at
https://github.com/apache/wicket/blob/39fb20b112e2005dab8e17667e5a763b1d89f18e/wicket-core/src/main/java/org/apache/wicket/markup/head/MetaDataHeaderItem.java#L125-L127
I agree that only double quotes should be escaped because only double
quotes may end prematurely the value.


> return qwerty'qwerty as qwerty\’qwerty
>
> I would like the return to be qwerty'qwerty (for example for the metatag
> description).
>
> What do you think of that ?
>
> Thanks
> François
>
>
>
>
>
>
>
>
>