mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 12:13:43 +08:00
SECURITY: prevents XSS when showing tooltip
This commit is contained in:
parent
6bcdc3ba4b
commit
b5b847f6d6
|
@ -1,9 +1,11 @@
|
|||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
|
||||
export function showTooltip() {
|
||||
const fadeSpeed = 300;
|
||||
const tooltipID = "#discourse-tooltip";
|
||||
const $this = $(this);
|
||||
const $parent = $this.offsetParent();
|
||||
const content = $this.attr("data-tooltip");
|
||||
const content = escapeExpression($this.attr("data-tooltip"));
|
||||
const retina =
|
||||
window.devicePixelRatio && window.devicePixelRatio > 1
|
||||
? "class='retina'"
|
||||
|
|
Loading…
Reference in New Issue
Block a user