See:
label.add(new AttributeModifier("onclick", true, new
Model("someFancyJavascript(\"fancy\")")));
... will result in something like:
<span onclick="someFancyJavascript(\"fancy\"">
For Firefox the value of onclick is now "someFancyJavascript(\", this is
the problem I'm experiencing.
The Ajax stuff is working fine because it uses single quotes (').
Sven
Juergen Donnerstag schrieb:
But it seems to properly escape it to me. No browser is complaining
with all the javascript you get when using Ajax. Are you experiencing
problems? Don't get me wrong, but if everything is working fine, why
should we change it? Is any xhtml validator complaining about it?
Juergen
On 7/8/07, Sven Meier <[EMAIL PROTECTED]> wrote:
It's about escaping a quote (") in the value, when not properly escaped,
the value ends prematurely.
Sven
Juergen Donnerstag schrieb:
> Until now nobody complaint about it not working properly in any
> browser. Could you please point to the right spec where it says that
> "\" must be escaped with ". A xhtml validator output would do as
> well.
>
> Juergen
>
> On 7/8/07, Sven Meier <[EMAIL PROTECTED]> wrote:
>> Why is ComponentTag escaping quotes in attribute values with a
>> backslash?
>> For valid xhtml it should be an entity:
>>
>> Index:
>>
/home/sven/workspace/wicket/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java
>>
>> ===================================================================
>> ---
>>
/home/sven/workspace/wicket/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java
>>
>> (revision 554069)
>> +++
>>
/home/sven/workspace/wicket/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/ComponentTag.java
>>
>> (working copy)
>> @@ -653,7 +653,7 @@
>> if (value != null)
>> {
>> response.write("=\"");
>> - value = Strings.replaceAll(value, "\"",
>> "\\\"");
>> + value = Strings.replaceAll(value, "\"",
>> """);
>> response.write(value);
>> response.write("\"");
>> }
>>
>> Should it not?
>>
>> Sven
>>
>