forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Discover] mailto links in data view urls (elastic#200070)
Adds `mailto:` as an allowed URL Url formatters in data views.
- Loading branch information
1 parent
d835eef
commit 4d44854
Showing
2 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,14 @@ describe('UrlFormat', () => { | |
); | ||
}); | ||
|
||
test('outputs a mailto: link when URL starts with mailto:', () => { | ||
const url = new UrlFormat({}); | ||
|
||
expect(url.convert('mailto:[email protected]', HTML_CONTEXT_TYPE)).toBe( | ||
'<a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer">mailto:[email protected]</a>' | ||
); | ||
}); | ||
|
||
test('outputs an <audio> if type === "audio"', () => { | ||
const url = new UrlFormat({ type: 'audio' }); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters