mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
# Backport This will backport the following commits from `main` to `8.6`: - [Improve script URL detection logic (#150045)](https://github.com/elastic/kibana/pull/150045) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Thomas Watson","email":"watson@elastic.co"},"sourceCommit":{"committedDate":"2023-02-01T18:24:28Z","message":"Improve script URL detection logic (#150045)","sha":"3fbbbd4c24cc6942e6df643a97c8b46edb0f8d99","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v8.7.0"],"number":150045,"url":"https://github.com/elastic/kibana/pull/150045","mergeCommit":{"message":"Improve script URL detection logic (#150045)","sha":"3fbbbd4c24cc6942e6df643a97c8b46edb0f8d99"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150045","number":150045,"mergeCommit":{"message":"Improve script URL detection logic (#150045)","sha":"3fbbbd4c24cc6942e6df643a97c8b46edb0f8d99"}}]}] BACKPORT--> Co-authored-by: Thomas Watson <watson@elastic.co>
This commit is contained in:
parent
b9c2e14aab
commit
4b09263a15
1 changed files with 2 additions and 1 deletions
|
@ -46,8 +46,9 @@ function getColor(rules, colorKey, value) {
|
|||
}
|
||||
|
||||
function sanitizeUrl(url) {
|
||||
const { protocol } = parseUrl(url);
|
||||
// eslint-disable-next-line no-script-url
|
||||
if (parseUrl(url).protocol === 'javascript:') {
|
||||
if (protocol === 'javascript:' || protocol === 'data:' || protocol === 'vbscript:') {
|
||||
return '';
|
||||
}
|
||||
return url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue