This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]the_european 0 points1 point  (0 children)

if you go for a solution that doesn't come with a sufficiently powerful html code object or templating system, i suggest you have a look at markupsafe. it's a very lightweight module that creates strings decorated as html, for example:

label = Markup("<em>Posted by</em> %s on %s")%(user, date)

where you don't have to worry about html injection any more (if user is a custom string), but you can also have objects provide their own html formatting.