From d37d15c00e34fa5fc72dbce2b1ba94f621af57d0 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 30 Jul 2020 14:36:48 +0530 Subject: [PATCH] fix: do not sanitize code field (bp #11133) (#11157) Co-authored-by: Chinmay D. Pai (cherry picked from commit 8ce340046ee27fccb1232e80d1aa3d3d5f8d4128) Co-authored-by: Sahil Khan --- frappe/model/base_document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 7d56736cdc..09d303bec7 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -703,8 +703,8 @@ class BaseDocument(object): sanitized_value = value if df and (df.get("ignore_xss_filter") - or (df.get("fieldtype")=="Code" and df.get("options")!="Email") - or df.get("fieldtype") in ("Attach", "Attach Image", "Barcode") + or (df.get("fieldtype") in ("Data", "Small Text", "Text") and df.get("options")=="Email") + or df.get("fieldtype") in ("Attach", "Attach Image", "Barcode", "Code") # cancelled and submit but not update after submit should be ignored or self.docstatus==2