mirror of https://gitlab.com/brutaldon/brutaldon
Fix some formatting issues introduced by hashtag parsing
This commit is contained in:
parent
8aaef481ea
commit
d9de6d7c85
|
@ -33,7 +33,7 @@
|
|||
</p>
|
||||
{% endif %}
|
||||
<div class="toot">
|
||||
{{ toot.content |relink_toot | strip_html | safe }}
|
||||
{{ toot.content | strip_html |relink_toot | safe }}
|
||||
</div>
|
||||
|
||||
{% if toot.media_attachments %}
|
||||
|
|
|
@ -18,7 +18,7 @@ def relink_tags(value):
|
|||
soup = BeautifulSoup(value, 'html.parser')
|
||||
for link in soup.find_all('a', class_='hashtag'):
|
||||
link['href'] = reverse('tag', args=[link.span.string])
|
||||
return str(soup)
|
||||
return soup.prettify(formatter=None)
|
||||
|
||||
@register.filter
|
||||
def relink_toot(value):
|
||||
|
|
Loading…
Reference in New Issue