[hunchentoot-devel] Printing the output

Jeffrey Cunningham jeffrey at cunningham.net
Thu Feb 8 16:19:35 UTC 2007


On Thu Feb 08, 2007 at 10:40:38AM -0500, Andrei Stebakov wrote:
> I am a bit confused about using macros like with-html. Let's say if I want to
> produce an html with my post parameter value in it. Just saying (:p
> (post-parameter "foo")) won't put the value in the <p> tag.
> On the other hand saying (:p (format t "~a" (post-parameter "foo"))) or (:p
> (esc (post-parameter "foo"))) will produce the expected result. Same goes with
> (:p
>       (esc (with-output-to-string (s)
>                       (format s "~a" (post-parameter "foo")))))
> 

Try this:

(with-html (:p (str (post-parameter "foo"))))

--Jeff



More information about the Tbnl-devel mailing list