diff --git a/html_cleanup/static/temp/clean_proposed_file_name.html b/html_cleanup/static/temp/clean_proposed_file_name.html
deleted file mode 100644
index 23b4f73..0000000
--- a/html_cleanup/static/temp/clean_proposed_file_name.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-untitled
-
diff --git a/html_cleanup/static/temp/clean_www.icloud.com.html b/html_cleanup/static/temp/clean_www.icloud.com.html
deleted file mode 100644
index 23b4f73..0000000
--- a/html_cleanup/static/temp/clean_www.icloud.com.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-untitled
-
diff --git a/html_cleanup/static/temp/errors_log b/html_cleanup/static/temp/errors_log
index 2f71fe6..a1174b9 100644
--- a/html_cleanup/static/temp/errors_log
+++ b/html_cleanup/static/temp/errors_log
@@ -1,11 +1 @@
-2023-11-29 17:22:16 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
-2023-11-29 17:23:56 [ Screenshot 2023-11-20 at 12.07.54.png ] Le format du fichier n'est pas valide. Téléchargement refusé.
-30-11-2023 17:29 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
-30-11-2023 18:32 [ www.icloud.com.html ] *** Cleanup réussi. ***
-02-12-2023 10:41 [ Nantes_anthologie_cinema_viet.htm ] Le format du fichier n'est pas valide (absence de tag ou ). Téléchargement refusé.
-02-12-2023 10:44 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
-02-12-2023 10:45 [ cleanup_html.vbs.txt ] Le format du fichier n'est pas valide (absence de tag ou ). Téléchargement refusé.
-02-12-2023 10:49 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
-02-12-2023 11:02 [ Nantes_anthologie_cinema_viet copy.htm ] *** Cleanup réussi. ***
-02-12-2023 11:10 [ Nantes_anthologie_cinema_viet copy.htm ] *** Cleanup réussi. ***
-02-12-2023 11:11 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
+03-12-2023 10:35 [ Nantes_anthologie_cinema_viet.htm ] *** Cleanup réussi. ***
diff --git a/html_cleanup/templates/view_log.jinja2 b/html_cleanup/templates/view_log.jinja2
index f4cce28..7f73462 100644
--- a/html_cleanup/templates/view_log.jinja2
+++ b/html_cleanup/templates/view_log.jinja2
@@ -11,7 +11,7 @@
{% if not lines %}
-
+
diff --git a/html_cleanup/views/default.py b/html_cleanup/views/default.py
index ebd769b..9aff5b8 100644
--- a/html_cleanup/views/default.py
+++ b/html_cleanup/views/default.py
@@ -136,13 +136,19 @@ def clean_html(input_file, output_file):
done = True
skip_tag = False
- tag = s.split(" ")
+ tag = s.split()
if tag:
tag[0] = tag[0].lower()
if tag[0] in ["table", "div", "img", "a"]:
- line_out += "<{}>".format(s)
+ line_out += "<{}".format(s)
+ if end_tag > 0:
+ # si end tag trouvé, fermer
+ line_out += ">"
+ else:
+ # sinon contine de recopier la ligne
+ skip_tag = False
elif tag[0] in ["p"]:
line_out += "
"
elif tag[0] in ["b", "/b", "em", "/em", "i", "/i", "li", "li/", "/li",
@@ -195,6 +201,7 @@ def view_log(request):
lines = file.readlines()
file.close()
except Exception as e:
+ message = "Le fichier Journal est vide !"
pass
# lire tous les fichiers du dossier triés par date