forked from mirrors/bookwyrm
Revert "Recognize profile summary linebreaks + whitespace"
This commit is contained in:
parent
b3e437fd18
commit
f996cc7d10
2 changed files with 1 additions and 4 deletions
|
@ -26,8 +26,6 @@ class InputHtmlParser(HTMLParser): # pylint: disable=abstract-method
|
||||||
self.output = []
|
self.output = []
|
||||||
# if the html appears invalid, we just won't allow any at all
|
# if the html appears invalid, we just won't allow any at all
|
||||||
self.allow_html = True
|
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):
|
def handle_starttag(self, tag, attrs):
|
||||||
"""check if the tag is valid"""
|
"""check if the tag is valid"""
|
||||||
|
@ -58,7 +56,6 @@ class InputHtmlParser(HTMLParser): # pylint: disable=abstract-method
|
||||||
|
|
||||||
def get_output(self):
|
def get_output(self):
|
||||||
"""convert the output from a list of tuples to a string"""
|
"""convert the output from a list of tuples to a string"""
|
||||||
self.output.append(("data", "</span>"))
|
|
||||||
if self.tag_stack:
|
if self.tag_stack:
|
||||||
self.allow_html = False
|
self.allow_html = False
|
||||||
if not self.allow_html:
|
if not self.allow_html:
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{% if user.summary %}
|
{% if user.summary %}
|
||||||
{{ user.summary|to_markdown|safe|truncatechars_html:81 }}
|
{{ user.summary|to_markdown|safe|truncatechars_html:40 }}
|
||||||
{% else %} {% endif %}
|
{% else %} {% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue