Merge pull request #11133 from sahil28297/fix_sanitise_in_code

fix: do not sanitize code field
This commit is contained in:
Himanshu 2020-07-28 19:41:07 +05:30 committed by GitHub
commit 67d4580f2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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