mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix: minor improvements to web templates, banking page and CI workflow (backport #55525)
Escape user content in the announcement and project search web templates.
(cherry picked from commit 85be72a403)
This commit is contained in:
@@ -24,10 +24,10 @@
|
||||
if(content.length > show_char) {
|
||||
|
||||
var c = content.substr(0, show_char)
|
||||
var h = content.substr(show_char, content.length - show_char);
|
||||
|
||||
html = c + ' ...'
|
||||
$(this).html(html);
|
||||
// Set as text (not HTML) so DOM text isn't re-interpreted as
|
||||
// markup (XSS). \u00a0 is a non-breaking space (same as ).
|
||||
$(this).text(c + '\u00a0\u00a0...');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ frappe.ready(function() {
|
||||
}
|
||||
var thread = null;
|
||||
function findResult(t) {
|
||||
window.location.href="/projects?project={{doc.name}}&q=" + t;
|
||||
window.location.href="/projects?project={{doc.name}}&q=" + encodeURIComponent(t);
|
||||
}
|
||||
|
||||
$("#project-search").keyup(function() {
|
||||
|
||||
Reference in New Issue
Block a user