浏览代码

fix: do not sanitize code field (bp #11133) (#11157)

Co-authored-by: Chinmay D. Pai <chinmaydpai@gmail.com>
(cherry picked from commit 8ce340046e)

Co-authored-by: Sahil Khan <sahilkhan28297@gmail.com>
version-14
mergify[bot] 5 年前
committed by GitHub
父节点
当前提交
d37d15c00e
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      frappe/model/base_document.py

+ 2
- 2
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


正在加载...
取消
保存