fix: escape text types before setting disp area (#25520)
This commit is contained in:
parent
0ec8f8f108
commit
fa6ec99c89
1 changed files with 2 additions and 1 deletions
|
|
@ -146,11 +146,12 @@ frappe.ui.form.ControlInput = class ControlInput extends frappe.ui.form.Control
|
|||
} else {
|
||||
value = this.value || value;
|
||||
}
|
||||
if (this.df.fieldtype === "Data") {
|
||||
if (["Data", "Long Text", "Small Text", "Text", "Password"].includes(this.df.fieldtype)) {
|
||||
value = frappe.utils.escape_html(value);
|
||||
}
|
||||
let doc = this.doc || (this.frm && this.frm.doc);
|
||||
let display_value = frappe.format(value, this.df, { no_icon: true, inline: true }, doc);
|
||||
// This is used to display formatted output AND showing values in read only fields
|
||||
this.disp_area && $(this.disp_area).html(display_value);
|
||||
}
|
||||
set_label(label) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue