News for hackers. Stuff that matters.
Re:"Hacking" Skrill/Moneybookers, Bitbucket, Github, Heroku etc by eurleif on Tuesday April 03, 2012 @01:12AM (#3791559)
Jinja, a Python template engine, does something like that. When you include a string in a template, it's automatically escaped, but you can disable that by wrapping the string in a Markup object. You can also use the Markup class directly:

    >>> foo = u'I <3 you.'
    >>> bar = Markup(u'<h1>') + foo + Markup(u'</h1>')
    >>> print bar
    <h1>I &lt;3 you.</h1>

There are no comments on this comment yet.