]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Adjust `SAFE_URL_PATTERN` regex for use with `test` method. (#33153)
authorNikon the Third <nikonthethird@gmx.at>
Tue, 2 Mar 2021 15:16:09 +0000 (16:16 +0100)
committerGitHub <noreply@github.com>
Tue, 2 Mar 2021 15:16:09 +0000 (17:16 +0200)
commit7ad0625b8d1e35f0843040602d6cbf124786fc51
tree2df40ba7d9279e25f3537cbb70de01cbef4a494b
parent8ec32eec44f46da2980d851e88523b8765e76bc8
Adjust `SAFE_URL_PATTERN` regex for use with `test` method. (#33153)

The `test` method on regexes does not behave like `match` on strings
for checks if the regex matches when the global modifier (g) is present.

Also adds a unit test on tooltips for sanitizing the same template twice.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
js/src/tools/sanitizer.js
js/tests/unit/tooltip.js