[racket-users] "<>&" in script xexprs

2017-09-19 Thread Byron Davies
In strings, xexpr->xml converts "<>&” into <, 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 < n”. I tried workarounds for as long as I

Re: [racket-users] "<>&" in script xexprs

2017-09-19 Thread Jon Zeppieri
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 wrote: > In strings,

Re: [racket-users] "<>&" in script xexprs

2017-09-19 Thread Matthew Butterick
> On Sep 19, 2017, at 1:36 PM, Byron Davies wrote: > > In strings, xexpr->xml converts "<>&” into <, 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

Re: [racket-users] "<>&" in script xexprs

2017-09-19 Thread Byron Davies
Thank you for highlighting cdata. That’s an important clue. Now I know to wrap my javascript strings in a cdata structure/form. > On Sep 19, 2017, at 1:48 PM, Jon Zeppieri wrote: > > I haven't tried this, but I think that script source should be in a > cdata structure > [http://docs.racket-la

Re: [racket-users] "<>&" in script xexprs

2017-09-19 Thread Byron Davies
Right. My understanding increases bit by bit. I’m using response/xexpr, which — unlike your xexpr->html — doesn’t special-case script and style tags. Funny, I had read through your txexpr docs, but the special-casing of script and style didn’t jump out at me at the time, and I had forgotten it

Re: [racket-users] "<>&" in script xexprs

2017-09-19 Thread Matthew Butterick
> On Sep 19, 2017, at 5:38 PM, Byron Davies wrote: > > Right. My understanding increases bit by bit. > > I’m using response/xexpr, which — unlike your xexpr->html — doesn’t > special-case script and style tags. Funny, I had read through your txexpr > docs, but the special-casing of script an