You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jens Alenius <je...@megasol.se> on 2009/05/07 13:12:49 UTC
AjaxResponse with control characters is not validated
Hi.
Found something that might be a wicket ajax bug.
This code wont work in Firefox and we believe that its the Ajax xml
response that is invalid.
The control characters is not properly escaped. Ex: "\u0014" is written
as 0014 in the xml Ajax Response but should be .
See: http://www.w3.org/TR/REC-xml/#dt-charref.
This code wont work in firefox
Markup:
...
<div wicket:id="testValue"></div>
<form wicket:id="testform">
<div wicket:id="testSubmit" class="submitbutton">Submit</div>
</form>
...
Java:
....
final Label testLabel = new Label("testValue",themodel);
testLabel.setOutputMarkupId(true);
add(testLabel);
Form<String> testForm = new Form<String>("testform");
testForm.add(new AjaxButton("testSubmit"){
@Override
protected void onSubmit(AjaxRequestTarget pTarget, Form<?>
pForm) {
themodel.setObject("\u0014");
pTarget.addComponent(testLabel);
}
});
add(testForm);
...
Jens Alenius
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxResponse with control characters is not validated
Posted by jensiator <je...@megasol.se>.
done!
igor.vaynberg wrote:
>
> open a jira issue and add a quickstart please.
>
> -igor
>
> On Thu, May 7, 2009 at 4:12 AM, Jens Alenius <je...@megasol.se>
> wrote:
>> Hi.
>> Found something that might be a wicket ajax bug.
>> This code wont work in Firefox and we believe that its the Ajax xml
>> response
>> that is invalid.
>> The control characters is not properly escaped. Ex: "\u0014" is written
>> as
>> 0014 in the xml Ajax Response but should be .
>> See: http://www.w3.org/TR/REC-xml/#dt-charref.
>>
>> This code wont work in firefox
>>
>> Markup:
>> ...
>> <div wicket:id="testValue"></div>
>> <form wicket:id="testform">
>> <div wicket:id="testSubmit" class="submitbutton">Submit</div>
>> </form>
>> ...
>>
>>
>> Java:
>> ....
>> final Label testLabel = new Label("testValue",themodel);
>> testLabel.setOutputMarkupId(true);
>> add(testLabel);
>> Form<String> testForm = new Form<String>("testform");
>> testForm.add(new AjaxButton("testSubmit"){
>>
>> @Override
>> protected void onSubmit(AjaxRequestTarget pTarget, Form<?>
>> pForm)
>> {
>> themodel.setObject("\u0014");
>> pTarget.addComponent(testLabel);
>> } });
>> add(testForm);
>> ...
>>
>> Jens Alenius
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
--
View this message in context: http://www.nabble.com/AjaxResponse-with-control-characters-is-not-validated-tp23424575p23442249.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AjaxResponse with control characters is not validated
Posted by Igor Vaynberg <ig...@gmail.com>.
open a jira issue and add a quickstart please.
-igor
On Thu, May 7, 2009 at 4:12 AM, Jens Alenius <je...@megasol.se> wrote:
> Hi.
> Found something that might be a wicket ajax bug.
> This code wont work in Firefox and we believe that its the Ajax xml response
> that is invalid.
> The control characters is not properly escaped. Ex: "\u0014" is written as
> 0014 in the xml Ajax Response but should be .
> See: http://www.w3.org/TR/REC-xml/#dt-charref.
>
> This code wont work in firefox
>
> Markup:
> ...
> <div wicket:id="testValue"></div>
> <form wicket:id="testform">
> <div wicket:id="testSubmit" class="submitbutton">Submit</div>
> </form>
> ...
>
>
> Java:
> ....
> final Label testLabel = new Label("testValue",themodel);
> testLabel.setOutputMarkupId(true);
> add(testLabel);
> Form<String> testForm = new Form<String>("testform");
> testForm.add(new AjaxButton("testSubmit"){
>
> @Override
> protected void onSubmit(AjaxRequestTarget pTarget, Form<?> pForm)
> {
> themodel.setObject("\u0014");
> pTarget.addComponent(testLabel);
> } });
> add(testForm);
> ...
>
> Jens Alenius
>
>
> ---------------------------------------------------------------------
> 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