diff --git a/frappe/public/js/frappe/form/layout.js b/frappe/public/js/frappe/form/layout.js index a7b139d13f..6caa979497 100644 --- a/frappe/public/js/frappe/form/layout.js +++ b/frappe/public/js/frappe/form/layout.js @@ -116,8 +116,9 @@ frappe.ui.form.Layout = class Layout { // wrap in a block if `html` does not contain html tags $html = $("
").text(html); } else { - $html = $(html); - $html.addClass("form-message border-bottom"); + // Wrap in a block just in case the string does not begin with a tag + // as Jquery assumes it to be a CSS selector and breaks. + $html = $("
").html(html); } // Add close button to block if not permanent diff --git a/frappe/public/js/frappe/utils/utils.js b/frappe/public/js/frappe/utils/utils.js index eabf37dada..ae4f223c19 100644 --- a/frappe/public/js/frappe/utils/utils.js +++ b/frappe/public/js/frappe/utils/utils.js @@ -157,16 +157,12 @@ Object.assign(frappe.utils, { is_html: function (txt) { if (!txt) return false; - if ( - txt.indexOf("
") == -1 && - txt.indexOf(" node.nodeType === 1); }, is_mac: function () { return window.navigator.platform === "MacIntel";