Skip to content

Commit

Permalink
Add tel to the default protocols and expose them (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
novacuum authored and jhchen committed Jul 10, 2017
1 parent ca33f32 commit f26d97d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion formats/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Link extends Inline {
}

static sanitize(url) {
return sanitize(url, ['http', 'https', 'mailto']) ? url : this.SANITIZED_URL;
return sanitize(url, this.PROTOCOL_WHITELIST) ? url : this.SANITIZED_URL;
}

format(name, value) {
Expand All @@ -27,6 +27,7 @@ class Link extends Inline {
Link.blotName = 'link';
Link.tagName = 'A';
Link.SANITIZED_URL = 'about:blank';
Link.PROTOCOL_WHITELIST = ['http', 'https', 'mailto', 'tel'];


function sanitize(url, protocols) {
Expand Down

0 comments on commit f26d97d

Please sign in to comment.