diff --git a/src/plugins/data/common/field_formats/converters/url.test.ts b/src/plugins/data/common/field_formats/converters/url.test.ts index 5ee195f8c775..771bde85626d 100644 --- a/src/plugins/data/common/field_formats/converters/url.test.ts +++ b/src/plugins/data/common/field_formats/converters/url.test.ts @@ -167,8 +167,8 @@ describe('UrlFormat', () => { }); }); - describe('whitelist', () => { - test('should assume a relative url if the value is not in the whitelist without a base path', () => { + describe('allow-list', () => { + test('should assume a relative url if the value is not in the allow-list without a base path', () => { const parsedUrl = { origin: 'http://kibana', basePath: '', @@ -193,7 +193,7 @@ describe('UrlFormat', () => { ); }); - test('should assume a relative url if the value is not in the whitelist with a basepath', () => { + test('should assume a relative url if the value is not in the allow-list with a basepath', () => { const parsedUrl = { origin: 'http://kibana', basePath: '/xyz', diff --git a/src/plugins/data/common/field_formats/converters/url.ts b/src/plugins/data/common/field_formats/converters/url.ts index e487bcfe0b01..81890e372839 100644 --- a/src/plugins/data/common/field_formats/converters/url.ts +++ b/src/plugins/data/common/field_formats/converters/url.ts @@ -161,8 +161,8 @@ export class UrlFormat extends FieldFormat { return this.generateImgHtml(url, imageLabel); default: - const inWhitelist = allowedUrlSchemes.some((scheme) => url.indexOf(scheme) === 0); - if (!inWhitelist && !parsedUrl) { + const allowed = allowedUrlSchemes.some((scheme) => url.indexOf(scheme) === 0); + if (!allowed && !parsedUrl) { return url; } @@ -178,7 +178,7 @@ export class UrlFormat extends FieldFormat { * UNSUPPORTED * - app/kibana */ - if (!inWhitelist) { + if (!allowed) { // Handles urls like: `#/discover` if (url[0] === '#') { prefix = `${origin}${pathname}`;