I haven't tried this, but I think that script source should be in a
cdata structure
[http://docs.racket-lang.org/xml/index.html?q=xexpr#%28def._%28%28lib._xml%2Fmain..rkt%29._cdata%29%29]
to prevent the behavior you're seeing. -J


On Tue, Sep 19, 2017 at 4:36 PM, Byron Davies <byrondav...@starshine.us> wrote:
> In strings, xexpr->xml converts "<>&” into &lt;, etc. I’m sure this was 
> well-intentioned, but in my use of web-server, I use javascript scripts 
> through the (script “…”) form.  In loop tests such as “i < n”, Javascript 
> does not grok the transformed text “i &lt; n”.  I tried workarounds for as 
> long as I could (e.g, using the “for key in lst” style of loops), but I 
> reached the end of the line when I wanted to change the contents of a table 
> cell using “cell.innerHTML = ‘<div …>’.
>
> But now I have to ask, is there a good way to make this change? In 
> …xml/private/writer.rkt there’s this:
>
> (define escape-table #px"[<>&]”)
>
> Would it make sense to rebind escape-table while inside a (script …) element, 
> or would this screw up something else?
>
> Byron
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to