Merge pull request #8891 from surajshetty3416/fix-list-view-render-p

fix: Escape HTML for the value of field with HTML Editor fieldtype
This commit is contained in:
sahil28297 2019-11-26 15:16:15 +05:30 committed by GitHub
commit 75d1aec6fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -581,7 +581,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
data-filter="${fieldname},=,${value}">
${_value}
</a>`;
} else if (['Text Editor', 'Text', 'Small Text'].includes(df.fieldtype)) {
} else if (['Text Editor', 'Text', 'Small Text', 'HTML Editor'].includes(df.fieldtype)) {
html = `<span class="text-muted ellipsis">
${_value}
</span>`;
@ -593,7 +593,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
}
return `<span class="ellipsis"
title="${__(label) + ': ' + _value}">
title="${__(label)}: ${escape(_value)}">
${html}
</span>`;
};