Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !33153

Adjust `SAFE_URL_PATTERN` regex for use with test method of regexes.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/nikonthethird/v4-dev into v4-dev Feb 19, 2021
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 2

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/nikonthethird/v4-dev