- def _word_repl(self, word):
- return link_tag(word)
-
- def _img_repl(self, word):
- pathname = relative_url(word)
- return '<a href="%s"><img border="0" src="%s" /></a>' % (pathname, pathname)
-
- def _url_repl(self, word):
- if img_re.match(word):
- return '<a href="%s"><img border="0" src="%s" /></a>' % (word, word)
- else:
- return '<a href="%s" rel="nofollow" class="external">%s</a>' % (word, word)
-