HTMLCleaner middleware only removes comments with an space after the two colons
This commit is contained in:
parent
2b588786fe
commit
9e87367acb
|
@ -11,7 +11,7 @@ class HTMLCleanerMiddleware(object):
|
|||
# Remove spaces
|
||||
content = strip_spaces_between_tags(content)
|
||||
# Remove HTML comments
|
||||
exp = re.compile('\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>')
|
||||
exp = re.compile('\<![ \r\n\t]*(-- ([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>')
|
||||
content = exp.sub('', content)
|
||||
response.content = content
|
||||
return response
|
||||
|
|
Loading…
Reference in New Issue