From 702086d12fa76b936b7f8ee797820d762e12f6ea Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Wed, 26 Apr 2017 17:13:01 -0300 Subject: [PATCH] Fixes #1046 --- sapl/relatorios/views.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sapl/relatorios/views.py b/sapl/relatorios/views.py index 62edc9791..4b5416c2c 100644 --- a/sapl/relatorios/views.py +++ b/sapl/relatorios/views.py @@ -1,5 +1,8 @@ from datetime import datetime +import re +import html + from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponse from django.utils.translation import ugettext_lazy as _ @@ -526,6 +529,12 @@ def get_sessao_plenaria(sessao, casa): dic_expedientes = {} dic_expedientes["nom_expediente"] = e.tipo.nome conteudo = e.conteudo + + # unescape HTML codes + # https://github.com/interlegis/sapl/issues/1046 + conteudo = re.sub('style=".*?"', '', conteudo) + conteudo = html.unescape(conteudo) + # escape special character '&' # https://github.com/interlegis/sapl/issues/1009 conteudo = conteudo.replace('&', '&')