Skip to content

Commit fb3de1b

Browse files
committed
Forbid HTML string tooltips
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 fb3de1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/modules/tippy.js

+1-1
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)