[Seaside] Issue with JSScript code generated in a render

Lukas Renggli renggli at gmail.com
Thu Mar 4 21:49:17 UTC 2010

Hmm, that's a very good catch. I wasn't aware of this problem.

I propose a fix in Javascript-Core-lr.84. It is a bit expensive, but
let me know if it solves the issue before I optimize and rewrite all


On 4 March 2010 20:50, John Toohey <jt at parspro.com> wrote:
> I ran into an issue pushing data and a script via Comet to a brower.
> My render generated correct HTML, plus this code :-
> <script type=\"text/javascript\">/*<![CDATA[*/$(\"#hp169\").spinner({min:1,max:99,step:0.25,increment:\"fast\",skipInitialChange:true,showOn:\"always\"})/*]]>*/</script>")
> This looks okay, but both FF and Chrome generate an error while
> parsing it. FF mentions "unterminated string" and Chrome complains of
> an Invalid TOKEN. I reduce the code to :-
>  $("#markettable").prepend(
>    "<script></script>"
>   );
> but this still gives an error.
> However, adding escaping the final forward / in the script tag fixes
> this. I found a lot of reports of this issue on the net, and the
> consensus seems to be to always escape a forward / whilst emitting JS
> to the browser. Having trouble finding the method that generates the
> tags, do anyone know where that is?
> --
> -JT
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Lukas Renggli

More information about the seaside mailing list