mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 19:55:43 +00:00
FIX: strip html tags from category badge tooltips
This commit is contained in:
parent
cefdb98b79
commit
eeeb834b6b
@ -95,8 +95,9 @@ Discourse.HTML = {
|
|||||||
(opts.clearChildColor ? ' clear-badge' : '') +
|
(opts.clearChildColor ? ' clear-badge' : '') +
|
||||||
extraClasses + "\" ";
|
extraClasses + "\" ";
|
||||||
name = Handlebars.Utils.escapeExpression(name);
|
name = Handlebars.Utils.escapeExpression(name);
|
||||||
// Add description if we have it
|
|
||||||
if (description) html += "title=\"" + Handlebars.Utils.escapeExpression(description) + "\" ";
|
// Add description if we have it, without tags. Server has sanitized the description value.
|
||||||
|
if (description) html += "title=\"" + $("<div/>").html(description).text() + "\" ";
|
||||||
|
|
||||||
if (!opts.clearChildColor) {
|
if (!opts.clearChildColor) {
|
||||||
var categoryStyle = Discourse.HTML.categoryStyle(category);
|
var categoryStyle = Discourse.HTML.categoryStyle(category);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user