fix: broken link preview

This commit is contained in:
Ankush Menat 2023-09-13 11:33:31 +05:30
parent cfb6e36441
commit 4b336b47a1
2 changed files with 2 additions and 2 deletions

View file

@ -1837,7 +1837,7 @@ frappe.ui.form.Form = class FrappeForm {
<a class="indicator ${get_color(doc || {})}"
href="/app/${frappe.router.slug(df.options)}/${escaped_name}"
data-doctype="${df.options}"
data-name="${value}">
data-name="${frappe.utils.escape_html(value)}">
${label}
</a>
`;

View file

@ -26,7 +26,7 @@ frappe.ui.LinkPreview = class {
identify_doc() {
if (this.is_link) {
this.doctype = this.element.attr("data-doctype");
this.name = this.element.attr("data-name");
this.name = frappe.utils.unescape_html(this.element.attr("data-name"));
this.href = this.element.attr("href");
} else {
this.href = this.element