YaPel
unread,Dec 31, 2012, 10:20:04 AM12/31/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mako-d...@googlegroups.com
Hi guys, I'm having some issues with the mako template, I have this little snippet
me = c.me.getMessage()
r = re.compile(r'(www.[^ ]+)')
message = unescape(r.sub(r'<a href="http://\1" target="_blank">\1</a>', me)).replace('"', '"').replace('"','"')
return message
on my controler, basically, it looks for things that look like a web address, and then transform it into a proper html tag, and then I simply load that in a mako controller:
${c.message | n}
the thing is.. it looks like in some configurations that, | n isn't working, I can see the html tag instead of the hyperlink, any idea on what may be going on?? thanks!