Skip to content

Commit 2b0093c

Browse files
authored
Forbid HTML string tooltips (#20935)
Tippy allows HTML strings to be passed as content but we do not use this feature (we do pass HTML only as Element), so it's better to disable it for increased security. Ref: https://atomiks.github.io/tippyjs/v6/html-content/#string
1 parent aa2e473 commit 2b0093c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/modules/tippy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function createTippy(target, opts = {}) {
55
appendTo: document.body,
66
placement: 'top-start',
77
animation: false,
8-
allowHTML: true,
8+
allowHTML: false,
99
maxWidth: 500, // increase over default 350px
1010
arrow: `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`,
1111
...(opts?.role && {theme: opts.role}),

0 commit comments

Comments
 (0)