Created by: nikonthethird
Follow-up PR of #33136 for Bootstrap 4.
This also removes the global modifier from the SAFE_URL_PATTERN
regex, see the other PR for details why.
Since Bootstrap V4 uses a different unit testing strategy than V5, based on the dist
files, the sanitizer is not directly accessible since the file is inlined into tooltip.js
. Therefore, the unit test for the sanitation has been added to the tooltip unit tests and simply adds two tooltips with the same HTML template to the test fixture. Then it checks that the tooltips contents are correct, using the same logic as the unit test in V5.
I verified that the test works by first running it with the global modifier on the regex, where it fails, then removing the global modifier and it passes.