Closed GoogleCodeExporter closed 8 years ago
I currently work around by having my own ImgTag implementation:
import postmarkup
class ImgTag(postmarkup.ImgTag):
def render_open(self, parser, node_index):
# Check for params (like [url=] tag)
if self.params:
url = self.params.strip()
# Default behaviour (url is between [img][/img]
else:
contents = self.get_contents(parser)
self.skip_contents(parser)
url = postmarkup.strip_bbcode(contents).replace(u'"', "%22")
return u'<img src="%s"></img>' % url
markup = postmarkup.create()
markup.add_tag(ImgTag, 'img')
markup.render_to_html('[url=http://www.google.com/][img=http://google.com/images/logo.gif][/url]')
Original comment by jaap.roes@gmail.com
on 12 Dec 2010 at 9:44
Thanks. Fixed in trunk.
Original comment by willmcgugan
on 4 Jan 2011 at 5:01
Original issue reported on code.google.com by
jaap.roes@gmail.com
on 12 Dec 2010 at 9:41