[racket] Ensuring data fed to web-server/templates is textual

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Feb 8 13:17:36 EST 2012

web-server/templates uses scribble/text

So, if you return a function, then it will be called.

We could also change scribble/text to support a struct/class property
for JIT transformation. Does that sound good?

Is that okay with you, Eli?


On Tue, Feb 7, 2012 at 4:50 PM, Jordan Johnson <jmj at fellowhuman.com> wrote:
> Hi all,
> I'm using web-server/templates to generate text, and the data in variables I reference in the template include s-exps that may, in some cases, contain image% objects.  I want it to render the image%s as plain text; even just the string "<IMAGE>" or similar would be adequate.
> So, my question is: how (via the template system or other libraries) can I best make racket perform this translation, ideally without writing code to walk the s-exp trees?  It seems there must be a way someplace to tweak the output function used by the template library, but I don't know where that would be.
> Best,
> Jordan
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.