[racket] How to not escape html entities in xexpr->string ?
There is no way to mark some strings as "safe". However, you can
include CDATA in an xexpr and the xml library assumes that cdata have
the cdata wrapper--- <![CDATA[....]]>----but you can just lie.
Here is the documentation for CDATA:
http://docs.racket-lang.org/xml/index.html?q=cdata#(def._((lib._xml/main..rkt)._cdata))
Here is the documentation for using it with templates to avoid quoting:
http://docs.racket-lang.org/web-server/templates.html?q=cdata#(part._.H.T.T.P_.Responses)
Jay
On Fri, Jun 8, 2012 at 10:29 PM, 安龙 <aisk1988 at gmail.com> wrote:
> Hi all,
> I use xexpr to write template, but i find "xexpr/response" will escape
> html entities like "<" to < . xexpr->string do this thing also, so how to
> mark some strings are "safe" in expr?
>
> Best wishes
>
>
> --
> aisk
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay
"The glory of God is Intelligence" - D&C 93