handle extra attributes in imgs in condition repl (#700)
This commit is contained in:
parent
d806f44484
commit
ed9fba954e
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user