diff --git a/html_cleanup/views/default.py b/html_cleanup/views/default.py index a7b1432..c5a3b2d 100644 --- a/html_cleanup/views/default.py +++ b/html_cleanup/views/default.py @@ -134,7 +134,8 @@ def clean_html(input_file, output_file): #20260104: removed "span", #20260122: move the function check_input_name into the function clean_html as inner function #20260128: removed text-align:justify in
- #version: 3_5_3_3
+ #20260129: added strikethrough tag: , , : insert with underline
+ #version: 3_5_3_5
def check_input_name(attribute):
ret_flag=False
@@ -157,7 +158,6 @@ def clean_html(input_file, output_file):
nb_lines = 0
for line_in in fi:
- line_in = html.unescape(line_in)
line_out = ""
if not body:
@@ -235,7 +235,7 @@ def clean_html(input_file, output_file):
elif tag[0] in ["b", "/b", "em", "/em", "i", "/i", "li", "/li", "ol", "/ol",
"ul", "/ul", "strong", "/strong", "sub", "/sub", "sup", "/sup",
- "u", "/u"]:
+ "u", "/u", "s", "/s", "del", "/del", "ins", "/ins"]:
line_out += "<{}>".format(tag[0])
elif tag[0] in ["/h1", "/h2", "/h3", "/h4", "/h5", "/h6", "/p",
"body", "/body", "/html", "/div", "/img", "/a"]:
@@ -244,7 +244,7 @@ def clean_html(input_file, output_file):
line_out += "<{}>".format(tag[0])
elif tag[0] in ["br", "br/", "hr"]:
line_out += "<{}>".format(tag[0])
-
+
if line_out != "":
fo.write(line_out + "\n")