mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Improve script URL detection logic (#150045)
This commit is contained in:
parent
fea634d9a4
commit
3fbbbd4c24
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