Skip to content

Commit

Permalink
[IMP] base_wamas_ubl: support escaping the value of variables into th…
Browse files Browse the repository at this point in the history
…e xml content
  • Loading branch information
duongtq committed Jun 28, 2024
1 parent 9cd45f5 commit 8b7ed16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base_wamas_ubl/lib/wamas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import pytz
from dateutil.parser import parse
from markupsafe import escape

from .const import (
DEFAULT_TIMEZONE,
Expand Down Expand Up @@ -401,7 +402,7 @@ def fw2dict(line, grammar, telegram_type):
dp = fdef["dp"]
val = float(b[:-dp] + "." + b[-dp:])
else:
val = b.rstrip()
val = escape(b.rstrip())
res[fname] = val
_logger.debug(pformat(res))
return res
Expand Down

0 comments on commit 8b7ed16

Please sign in to comment.