bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Move tooltip over SVG example from docs to visual tests

Open tkrotoff opened this issue 3 years ago • 2 comments
trafficstars

Fixes https://github.com/twbs/bootstrap/issues/32715 https://github.com/twbs/bootstrap/issues/32715#issuecomment-886745329

Problem: the tooltip visual tests are already broken (not related to this PR).

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '<img src=1 onerror=alert(123)>' is not a valid selector.

This is because of:

<button ... data-bs-container="<img src=1 onerror=alert(123)>">
  Tooltip with XSS container
</button>

Visual tests should be played by Playwright (or similar) to avoid this kind of breakage

FYI the original tooltip over SVG example was introduced here: https://github.com/twbs/bootstrap/pull/30928

tkrotoff avatar Apr 10 '22 21:04 tkrotoff

Any news?

tkrotoff avatar Jun 14 '22 20:06 tkrotoff

Any news?

tkrotoff avatar Jul 23 '22 14:07 tkrotoff

@GeoSot @XhmikosR Thoughts here?

mdo avatar Dec 29 '22 06:12 mdo

It is clearly my personal opinion, but I like it as it is, in the docs. It serves as an example, and easy visiting area

GeoSot avatar Dec 30 '22 09:12 GeoSot

Are you interested to also have the SVG example in js/tests/visual/tooltip.html It would makes sense

I can cherry-pick this and make a new PR

tkrotoff avatar Jan 18 '23 12:01 tkrotoff