Resolve "Relative links in Vulnerability modal not clickable"
What does this MR do?
This MR brings a small change to the isSafeUrl
utility so it considers root-relative URLs safe, meaning that all these patterns are valid:
http://gitlab.com/some/path
https://gitlab.com/some/path
/some/path
Additionally, the valuedFields
computed property will force field
field to be an URL pointing to vulnerability.blob_path
(if available).
Does this MR meet the acceptance criteria?
Conformity
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - Cross-browser testing revealed that
isSafeUrl
does not work as expected on IE11 (neither onmaster
or this branch), the fix involves upgradingcore-js
so we can use theURL()
polyfill, that will have to be done in follow up MRs
- Cross-browser testing revealed that
Closes #9283 (closed)
Edited by Paul Gascou-Vaillancourt