fix(convert): ne prettify pas le html car ça casse inutilement des choses

This commit is contained in:
François Poulain 2020-08-04 10:54:37 +02:00
parent e8771df78d
commit 3dc21e7b94
1 changed files with 2 additions and 2 deletions

View File

@ -90,14 +90,14 @@ def fetch_and_remove_logo(article, force_download):
if src and re.match(r'^(https?)?://', src):
fetch_logo(src)
remove_img(img)
article.descriptif = soup.prettify(formatter="html5")
article.descriptif = str(soup)
article.save()
def sanitarize_html(html):
html = strong_to_dl(html)
soup = bs(html, 'html.parser')
return soup.prettify(formatter="html5")
return str(soup)
def convert_node(node, options):