mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
FIX: strip html tags from category badge tooltips
This commit is contained in:
parent
cefdb98b79
commit
eeeb834b6b
1 changed files with 3 additions and 2 deletions
|
@ -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…
Reference in a new issue