thx will change that.

On 2/7/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:

* Johan Compagner:
> it was this:
>
> protected final String getJsTimeoutCall(final Duration updateInterval)
>    {
>        return "setTimeout(function() { " + getCallbackScript(false,
true) +
> " }, "
>                + updateInterval.getMilliseconds() + ");";
>    }
>
> and now this:
>
> protected final String getJsTimeoutCall(final Duration updateInterval)
>    {
>        // this might look strange, but it is necessary for IE not to
leak
> :(
>        return "setTimeout(\"" + getCallbackScript(false, true) + "\", "
>                + updateInterval.getMilliseconds() + ");";
>    }
>
> So now it is escaped with an extra \" xxx \"
>
> But this will generated wrong kind of things now for example an onload:
>
> <body onKeyUp="checkForFunctionKey(event);"
> onload="onPageLoad();setTimeout(\"var
>
wcall=wicketAjaxGet('?wicket:interface=:17:screensaver:ss_login:keepalive:-1:IUnversionedBehaviorListener:0&wicket:ignoreIfNotActive=true',
> function() { }, function() { });\", 900000);">
>
>
> This is wrong because now FF complains that there is an illegal char.

Hi Johan,

I remember this change, and you're right JavaScript on the client
side behaves differently.  It requires proper XML escaping.

The fix to the fix is to replace \" with &quot;

I tested it locally with a sample HTML file and works fine.

I don't use this AjaxTimer myself, that's why I didn't encounter
the problem.

Cheers,
--
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Reply via email to