def end_a(self):
self.accumulator += '</a>'
+ def start_img(self, attrs):
+ self.accumulator += '<img'
+ for attrname, value in attrs:
+ value = cgi.escape(value, True)
+ if attrname == 'src':
+ self.accumulator += ' src="%s"' % urljoin(self.base, value)
+ else:
+ self.accumulator += ' %s="%s"' % (attrname, value)
+ self.accumulator += '>'
+
+ def end_img(self):
+ pass
+
def absolute_urls(body, base):
parser = AbsURLHTMLParser(base)