diff --git a/lib/index.js b/lib/index.js index b6f5ed0..0bddf4c 100644 --- a/lib/index.js +++ b/lib/index.js @@ -121,7 +121,7 @@ const changelog = const emptyPlugins = [] /** @type {Readonly} */ const emptyRemarkRehypeOptions = {allowDangerousHtml: true} -const safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i +const safeProtocol = /^(https?|ircs?|mailto|tel|xmpp)$/i // Mutable because we `delete` any time it’s used and a message is sent. /** @type {ReadonlyArray>} */ diff --git a/test.jsx b/test.jsx index 1b254db..b4eaaf7 100644 --- a/test.jsx +++ b/test.jsx @@ -335,6 +335,13 @@ test('Markdown', async function (t) { ) }) + await t.test('should support a tel', function () { + assert.equal( + renderToStaticMarkup(), + '

' + ) + }) + await t.test('should allow an empty URL', function () { assert.equal( renderToStaticMarkup(),