handle extra attributes in imgs in condition repl (#700)

This commit is contained in:
Damien Elmes 2013-04-11 18:34:53 +09:00
parent d806f44484
commit ed9fba954e

View File

@ -131,7 +131,7 @@ def stripHTML(s):
def stripHTMLMedia(s):
"Strip HTML but keep media filenames"
s = re.sub("<img src=[\"']?([^\"'>]+)[\"']? ?/?>", " \\1 ", s)
s = re.sub("<img[^>]+src=[\"']?([^\"'>]+)[\"']?[^>]*>", " \\1 ", s)
return stripHTML(s)
def minimizeHTML(s):