fix(Barcode): excluding Barcode feild from XSS FIlter (#7605)

(cherry picked from commit e579b8960e1c34e7ad0bf794a10596b40530bc09)
This commit is contained in:
Karthikeyan S 2019-05-30 13:51:15 +05:30 committed by Suraj Shetty
parent 88ce01a28a
commit acd2f589b6
2 changed files with 1 additions and 2 deletions

View file

@ -715,7 +715,6 @@ def validate_fields(meta):
for d in fields:
if not d.permlevel: d.permlevel = 0
if d.fieldtype != "Table": d.allow_bulk_edit = 0
if d.fieldtype == "Barcode": d.ignore_xss_filter = 1
if not d.fieldname:
d.fieldname = d.fieldname.lower()

View file

@ -627,7 +627,7 @@ class BaseDocument(object):
elif 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")
or df.get("fieldtype") in ("Attach", "Attach Image", "Barcode")
# cancelled and submit but not update after submit should be ignored
or self.docstatus==2