From 5ec32bac3b4d075c4df9137414c4f96697147b24 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:14:22 +0530 Subject: [PATCH] fix: escape print format code field(#22852) (#22864) (cherry picked from commit 68c28318dda013da83174cdb3a30e1fa541f44b8) Co-authored-by: surayp <96818210+surayp@users.noreply.github.com> --- frappe/templates/print_formats/standard_macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/templates/print_formats/standard_macros.html b/frappe/templates/print_formats/standard_macros.html index f82a2b7928c..53850e26fc4 100644 --- a/frappe/templates/print_formats/standard_macros.html +++ b/frappe/templates/print_formats/standard_macros.html @@ -109,7 +109,7 @@
{%- if df.fieldtype in ("Text", "Code", "Long Text") %}{%- endif %} {%- if df.fieldtype=="Code" %} -
{{ doc.get(df.fieldname) }}
+
{{ doc.get(df.fieldname)|e }}
{% else -%} {{ doc.get_formatted(df.fieldname, parent_doc or doc, translated=df.translatable) }} {% endif -%}