瀏覽代碼

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 sanitized_value = value


if df and (df.get("ignore_xss_filter") 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 # cancelled and submit but not update after submit should be ignored
or self.docstatus==2 or self.docstatus==2


Loading…
取消
儲存