fix(convert): ne prettify pas le html car ça casse inutilement des choses
This commit is contained in:
parent
e8771df78d
commit
3dc21e7b94
@ -90,14 +90,14 @@ def fetch_and_remove_logo(article, force_download):
|
|||||||
if src and re.match(r'^(https?)?://', src):
|
if src and re.match(r'^(https?)?://', src):
|
||||||
fetch_logo(src)
|
fetch_logo(src)
|
||||||
remove_img(img)
|
remove_img(img)
|
||||||
article.descriptif = soup.prettify(formatter="html5")
|
article.descriptif = str(soup)
|
||||||
article.save()
|
article.save()
|
||||||
|
|
||||||
|
|
||||||
def sanitarize_html(html):
|
def sanitarize_html(html):
|
||||||
html = strong_to_dl(html)
|
html = strong_to_dl(html)
|
||||||
soup = bs(html, 'html.parser')
|
soup = bs(html, 'html.parser')
|
||||||
return soup.prettify(formatter="html5")
|
return str(soup)
|
||||||
|
|
||||||
|
|
||||||
def convert_node(node, options):
|
def convert_node(node, options):
|
||||||
|
Loading…
Reference in New Issue
Block a user