Skip to content

Commit

Permalink
Forbid HTML string tooltips
Browse files Browse the repository at this point in the history
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
  • Loading branch information
silverwind committed Aug 23, 2022
1 parent aa2e473 commit fb3de1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/modules/tippy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function createTippy(target, opts = {}) {
appendTo: document.body,
placement: 'top-start',
animation: false,
allowHTML: true,
allowHTML: false,
maxWidth: 500, // increase over default 350px
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>`,
...(opts?.role && {theme: opts.role}),
Expand Down

0 comments on commit fb3de1b

Please sign in to comment.