From 5527a3c8170abbe6366319466be2f3a11c7a5050 Mon Sep 17 00:00:00 2001 From: Edward Date: Mon, 19 Nov 2018 13:34:15 -0200 Subject: [PATCH] Fixes #2386 (#2387) --- sapl/relatorios/views.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py index 861c4f988..495dd2aac 100755 --- a/sapl/relatorios/views.py +++ b/sapl/relatorios/views.py @@ -466,6 +466,29 @@ def get_espelho(mats): return materias +def remove_html_comments(text): + """ + Assume comentários bem formados e + não aninhados como --> + :param text: + :return: + """ + clean_text = text + start = clean_text.find('') + 2 + output_text = [] + for idx, i in enumerate(clean_text): + if not start <= idx <= end: + output_text.append(i) + clean_text = ''.join(output_text) + start = clean_text.find('