You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Manfred Bergmann <mb...@software-by-mabe.com> on 2019/02/12 09:37:59 UTC
Kendo UI - problem with apostroph character in strings
Hi.
In particular this popped up in the title of a Chart component.
Now, I can encode the string using URLEncoder but I'm wondering whether
the component should do that.
Because effectively I would need to have all resource string
`getString()` run through an encoder.
Any ideas on this?
Regards,
Manfred
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Kendo UI - problem with apostroph character in strings
Posted by Manfred Bergmann <mb...@software-by-mabe.com>.
OK, nice. I'll do that.
Thanks,
Manfred
--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Kendo UI - problem with apostroph character in strings
Posted by Sven Meier <sv...@meiers.net>.
Hi,
you can use Options#asString() for automatic escaping of strings.
Have fun
sven
Am 12.02.19 um 17:07 schrieb Manfred Bergmann:
> Hi.
>
> Yeah, the problem was in the provided Options object where we have used
> single quotes instead of double quotes.
> When using double quotes it works.
>
> So initially we had:
>
> opts.set("title", s"{ text: '${getString("title:print_activity")}' }")
>
> Changing to:
>
> opts.set("title", s"""{ text: "${getString("title:print_activity")}" }""")
>
> works.
>
> I think that solves it.
>
>
> Thanks,
> Manfred
>
>
>
> Sven Meier wrote
>> how are you configuring the Options object? Show some code please.
>> Sven
>>
>>
>>>
>>> On 12.02.2019 at 10:46,
>> <Manfred Bergmann>
>> wrote:
>>>
>>>
>>> Sorry. I forgot a few things. Using Wicket 8.2 with Kendo UI 8.1. The
>>> error is only visible in the Wicket Debug window: ERROR:
>>> Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
>>> SyntaxError: missing } after property list, text: The violating property
>>> is this: "title": [{ text: 'Print 'ctivity' }] This certainly fails and
>>> means trouble. Manfred Manfred Bergmann schrieb am 12.02.19 um 10:37: >
>>> Hi. > > In particular this popped up in the title of a Chart
>>> component. > Now, I can encode the string using URLEncoder but I'm
>>> wondering whether > the component should do that. > Because
>>> effectively I would need to have all resource string > `getString()`
>>> run through an encoder. > > Any ideas on this? > > > Regards,
>>>> Manfred
>>> --------------------------------------------------------------------- To
>>> unsubscribe, e-mail:
>> users-unsubscribe@.apache
>> For additional commands, e-mail:
>> users-help@.apache
>>
>
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Kendo UI - problem with apostroph character in strings
Posted by Manfred Bergmann <mb...@software-by-mabe.com>.
Hi.
Yeah, the problem was in the provided Options object where we have used
single quotes instead of double quotes.
When using double quotes it works.
So initially we had:
opts.set("title", s"{ text: '${getString("title:print_activity")}' }")
Changing to:
opts.set("title", s"""{ text: "${getString("title:print_activity")}" }""")
works.
I think that solves it.
Thanks,
Manfred
Sven Meier wrote
> how are you configuring the Options object? Show some code please.
> Sven
>
>
>>
>> On 12.02.2019 at 10:46,
> <Manfred Bergmann>
> wrote:
>>
>>
>> Sorry. I forgot a few things. Using Wicket 8.2 with Kendo UI 8.1. The
>> error is only visible in the Wicket Debug window: ERROR:
>> Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
>> SyntaxError: missing } after property list, text: The violating property
>> is this: "title": [{ text: 'Print 'ctivity' }] This certainly fails and
>> means trouble. Manfred Manfred Bergmann schrieb am 12.02.19 um 10:37: >
>> Hi. > > In particular this popped up in the title of a Chart
>> component. > Now, I can encode the string using URLEncoder but I'm
>> wondering whether > the component should do that. > Because
>> effectively I would need to have all resource string > `getString()`
>> run through an encoder. > > Any ideas on this? > > > Regards,
>> > Manfred
>> --------------------------------------------------------------------- To
>> unsubscribe, e-mail:
> users-unsubscribe@.apache
> For additional commands, e-mail:
> users-help@.apache
>
>>
--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Kendo UI - problem with apostroph character in strings
Posted by Manfred Bergmann <mb...@software-by-mabe.com>.
Sorry. I forgot a few things.
Using Wicket 8.2 with Kendo UI 8.1.
The error is only visible in the Wicket Debug window:
ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
javascript: SyntaxError: missing } after property list, text:
The violating property is this:
"title": [{ text: 'Print 'ctivity' }]
This certainly fails and means trouble.
Manfred
Manfred Bergmann schrieb am 12.02.19 um 10:37:
> Hi.
>
> In particular this popped up in the title of a Chart component.
> Now, I can encode the string using URLEncoder but I'm wondering whether
> the component should do that.
> Because effectively I would need to have all resource string
> `getString()` run through an encoder.
>
> Any ideas on this?
>
>
> Regards,
> Manfred
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Kendo UI - problem with apostroph character in strings
Posted by sven <sv...@meiers.net>.
Hi,
how are you configuring the Options object? Show some code please.
Sven
>
> On 12.02.2019 at 10:46, <Manfred Bergmann> wrote:
>
>
> Sorry. I forgot a few things. Using Wicket 8.2 with Kendo UI 8.1. The error is only visible in the Wicket Debug window: ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: SyntaxError: missing } after property list, text: The violating property is this: "title": [{ text: 'Print 'ctivity' }] This certainly fails and means trouble. Manfred Manfred Bergmann schrieb am 12.02.19 um 10:37: > Hi. > > In particular this popped up in the title of a Chart component. > Now, I can encode the string using URLEncoder but I'm wondering whether > the component should do that. > Because effectively I would need to have all resource string > `getString()` run through an encoder. > > Any ideas on this? > > > Regards, > Manfred --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org
>