-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<img> inside HTML tooltip is only displayed every other hover. #33124
Comments
I investigated some more, and it appears to have to do with sanitization. When I initialize the tooltips with
|
I figured out what's wrong. This commit switched from using the Well, the // This is the regex that's causing the problem.
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi To fix the issue, simply remove the The correct regex would be: const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&\/:?]*(?:[#\/?]|$))/i And that fixes the issue on my end and I can leave the sanitizer turned on. I'll make a pull request if that's ok. |
我也遇到相同的问题,看了你这波操作属实流弊,所以我就直接借用了。 |
I opened an issue over at the eslint unicorn plugin so that the rule that introduced this bug can get fixed. |
Reproduction:
https://jsfiddle.net/3k4cL51w/
Steps:
The
Test
button has a tooltip withdata-bs-html="true"
on it and an<img>
tag in the title. When you hover your mouse multiple times over the button, you will see that the the image in the tooltip will only be shown every other hover.I tested this on Ubuntu 20.04 on Firefox and Chromium.
It worked on 5.0 beta 1, the issue only started appearing after I upgraded to 5.0 beta 2.
The text was updated successfully, but these errors were encountered: