From 3dc21e7b94036bf749b87c11566847b965fc9ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Poulain?= Date: Tue, 4 Aug 2020 10:54:37 +0200 Subject: [PATCH] =?UTF-8?q?fix(convert):=20ne=20prettify=20pas=20le=20html?= =?UTF-8?q?=20car=20=C3=A7a=20casse=20inutilement=20des=20choses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- drupal2spip_lal/base/convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drupal2spip_lal/base/convert.py b/drupal2spip_lal/base/convert.py index cfaf83c..d3e6e8a 100644 --- a/drupal2spip_lal/base/convert.py +++ b/drupal2spip_lal/base/convert.py @@ -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):