On Wednesday 05 December 2007, Chris Curvey wrote:
> I've got some (inherited) data that contains newlines, which I need to
> convert to <br> tags.  If I just put mystring.replace("\r\n", "<br>")
> in my controller, genshi very nicely turns that into &lt; br &gt;
>
> How can I prevent this from happening?  (And where in the docs would I
> find it...it's gotta be there somewhere, but I can't find it.)

You can use a simple

${Markup(my.value)}

in your template. This may be risky depending on where the data is from, 
because the above will literally inject HTML (or any markup for that) into 
the output - so bad people could i.e. inject youtube video embedds etc.

HTH

        Uwe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to