diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py
index 3c72b1654..26fd54f4d 100644
--- a/sapl/base/templatetags/common_tags.py
+++ b/sapl/base/templatetags/common_tags.py
@@ -1,3 +1,6 @@
+from _functools import reduce
+import re
+
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
@@ -9,7 +12,6 @@ from sapl.norma.models import NormaJuridica
from sapl.parlamentares.models import Filiacao
from sapl.utils import filiacao_data, SEPARADOR_HASH_PROPOSICAO
-
register = template.Library()
@@ -286,3 +288,12 @@ def render_chunk_vendors(extension=None):
return mark_safe('\n'.join(tags))
except:
return ''
+
+
+@register.filter(is_safe=True)
+@stringfilter
+def dont_break_out(value):
+ _safe = '
{}
'.format(value)
+ _safe = mark_safe(_safe)
+ return _safe
+
diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py
index 200f24db1..b6af79427 100644
--- a/sapl/crispy_layout_mixin.py
+++ b/sapl/crispy_layout_mixin.py
@@ -166,6 +166,7 @@ def get_field_display(obj, fieldname):
value)
elif 'TextField' in str_type_from_field:
display = value.replace('\n', '
')
+ display = '{}
'.format(display)
else:
display = str(value)
return verbose_name, display
diff --git a/sapl/templates/materia/materialegislativa_filter.html b/sapl/templates/materia/materialegislativa_filter.html
index 577cd3769..5cf56d17d 100644
--- a/sapl/templates/materia/materialegislativa_filter.html
+++ b/sapl/templates/materia/materialegislativa_filter.html
@@ -1,6 +1,6 @@
{% extends "crud/detail.html" %}
{% load i18n %}
-{% load crispy_forms_tags %}
+{% load crispy_forms_tags common_tags%}
{% block actions %}
@@ -48,7 +48,7 @@
{{m.tipo.sigla}} {{m.numero}}/{{m.ano}} - {{m.tipo}}
- Ementa: {{ m.ementa|safe }}
+ Ementa: {{ m.ementa|dont_break_out }}
{% if m.data_apresentacao %}
Apresentação: {{ m.data_apresentacao }}
diff --git a/sapl/templates/sessao/blocos_resumo/materias_expediente.html b/sapl/templates/sessao/blocos_resumo/materias_expediente.html
index 48dcf9c14..f32216df1 100644
--- a/sapl/templates/sessao/blocos_resumo/materias_expediente.html
+++ b/sapl/templates/sessao/blocos_resumo/materias_expediente.html
@@ -1,3 +1,5 @@
+
+{% load common_tags %}
|