mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Update sanitize_html.py
This commit is contained in:
parent
d75f33cfb2
commit
1c7ed30d65
1 changed files with 0 additions and 3 deletions
|
@ -26,8 +26,6 @@ class InputHtmlParser(HTMLParser): # pylint: disable=abstract-method
|
|||
self.output = []
|
||||
# if the html appears invalid, we just won't allow any at all
|
||||
self.allow_html = True
|
||||
self.output.append(("data", "<style>.show-white-space{white-space:pre-wrap;}</style>"))
|
||||
self.output.append(("data", "<span class=\"show-white-space\">"))
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
"""check if the tag is valid"""
|
||||
|
@ -58,7 +56,6 @@ class InputHtmlParser(HTMLParser): # pylint: disable=abstract-method
|
|||
|
||||
def get_output(self):
|
||||
"""convert the output from a list of tuples to a string"""
|
||||
self.output.append(("data", "</span>"))
|
||||
if self.tag_stack:
|
||||
self.allow_html = False
|
||||
if not self.allow_html:
|
||||
|
|
Loading…
Reference in a new issue