mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
SECURITY: escape quotes in tag description when rendering (#19730)
Co-authored-by: Daniel Waterworth <me@danielwaterworth.com>
This commit is contained in:
parent
cbcf8a064b
commit
692329896a
@ -2,6 +2,7 @@ import User from "discourse/models/user";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import { helperContext } from "discourse-common/lib/helpers";
|
||||
import { escape } from "pretty-text/sanitizer";
|
||||
|
||||
let _renderer = defaultRenderTag;
|
||||
|
||||
@ -44,7 +45,7 @@ export function defaultRenderTag(tag, params) {
|
||||
href +
|
||||
" data-tag-name=" +
|
||||
tag +
|
||||
(params.description ? ' title="' + params.description + '" ' : "") +
|
||||
(params.description ? ' title="' + escape(params.description) + '" ' : "") +
|
||||
" class='" +
|
||||
classes.join(" ") +
|
||||
"'>" +
|
||||
|
Loading…
Reference in New Issue
Block a user