From f26d97da69be2ededee17f8e1ab1ba75f79c17fd Mon Sep 17 00:00:00 2001 From: simon-at-fugu Date: Mon, 10 Jul 2017 09:28:02 +0200 Subject: [PATCH] Add tel to the default protocols and expose them (#1436) --- formats/link.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/formats/link.js b/formats/link.js index 7be620ac79..84deebc573 100644 --- a/formats/link.js +++ b/formats/link.js @@ -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) { @@ -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) {