diff --git a/frappe/public/css/docs.css b/frappe/public/css/docs.css index 2fdd0ae21d..7f07e8ac91 100644 --- a/frappe/public/css/docs.css +++ b/frappe/public/css/docs.css @@ -133,6 +133,7 @@ background-color: #ff5858; } .navbar-form .awesomplete { + margin-left: -15px; width: 300px; } @media (max-width: 1199px) { @@ -195,13 +196,14 @@ } #navbar-breadcrumbs > li > a { padding: 6px 15px 10px 0px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 170px; } @media (min-width: 991px) and (max-width: 1199px) { #navbar-breadcrumbs > li > a { - max-width: 143px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 120px; } } .toolbar-user-fullname { diff --git a/frappe/public/js/frappe/views/communication.js b/frappe/public/js/frappe/views/communication.js index f62914b822..1625ff4849 100755 --- a/frappe/public/js/frappe/views/communication.js +++ b/frappe/public/js/frappe/views/communication.js @@ -149,7 +149,7 @@ frappe.views.CommunicationComposer = Class.extend({ if (this.frm.subject_field && this.frm.doc[this.frm.subject_field]) { this.subject = __("Re: {0}", [this.frm.doc[this.frm.subject_field]]); } else { - this.subject = __(this.frm.doctype) + ': ' + this.frm.docname; + this.subject = __(this.frm.doctype) + ': ' + this.frm[this.frm.meta.title_field || name]; } } } diff --git a/frappe/utils/html_utils.py b/frappe/utils/html_utils.py index fa74c9ea33..3daa87d360 100644 --- a/frappe/utils/html_utils.py +++ b/frappe/utils/html_utils.py @@ -2,6 +2,17 @@ import json import bleach, bleach_whitelist.bleach_whitelist as bleach_whitelist from six import string_types +def clean_html(html): + if not isinstance(html, string_types): + return html + + return bleach.clean(html, + tags=['div', 'p', 'br', 'ul', 'ol', 'li', 'b', 'i', 'em', + 'table', 'thead', 'tbody', 'td', 'tr'], + attributes=[], + styles=['color', 'border', 'border-color'], + strip=True, strip_comments=True) + def sanitize_html(html, linkify=False): """ Sanitize HTML tags, attributes and style to prevent XSS attacks