Skip to content

Commit

Permalink
Escape the text used in the observations
Browse files Browse the repository at this point in the history
  • Loading branch information
danimaribeiro committed Jan 3, 2024
1 parent 9e7bf68 commit 2b03edc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pytrustnfe/nfe/danfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from io import BytesIO
from textwrap import wrap
import math
from html import escape
from decimal import Decimal

from reportlab.lib import utils
Expand Down Expand Up @@ -1051,7 +1052,7 @@ def adicionais(self, oXML=None, tamanho_diminuir=0):
observacoes = tagtext(oNode=el_infAdic, cTag="infCpl")
if fisco:
observacoes = fisco + " " + observacoes
P = Paragraph(observacoes, styles["Normal"])
P = Paragraph(escape(observacoes), styles["Normal"])
w, h = P.wrap(128 * mm, 32 * mm)
altura = (self.height - self.nlin - 5) * mm
P.drawOn(self.canvas, (self.nLeft + 1) * mm, altura - h)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages


VERSION = "2.0.1"
VERSION = "2.0.2"


setup(
Expand Down

0 comments on commit 2b03edc

Please sign in to comment.