diff --git a/README.md b/README.md index b21ca10..547ee84 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ rebuilds it: only `footer div nav section aside header p span small strong em b br hr h2-h6` survive; attributes are limited to `class title role lang dir aria-* data-pfs-*` plus `href rel target hreflang` on `a` and `src alt width height loading decoding` on `img`; every value is entity-decoded, checked and re-escaped, so what was checked is what the browser -sees; `href` accepts `http:`, `https:`, `mailto:`, `tel:` or relative URLs; `src` accepts +sees; `href` accepts `http:`, `https:`, `mailto:`, `tel:`, `sms:` or relative URLs; `src` accepts `http:`, `https:`, `mailto:` or relative URLs, after decoding and removing control characters. Comments, unknown tags (text kept, escaped), and `script`/`style`/`iframe`/ `svg`/`math`/`noscript`/`template`/... with their contents are dropped. The only `{{/css}}
", + "footer": "", "houseLinks": [ { "label": "Find a pro", diff --git a/test/sanitize.test.js b/test/sanitize.test.js index e958867..5dfac5f 100644 --- a/test/sanitize.test.js +++ b/test/sanitize.test.js @@ -63,6 +63,9 @@ test('javascript: urls in every disguise are dropped', () => { test('safe urls survive and are re-escaped', () => { assert.equal(sanitizeHtml('x'), 'x'); assert.equal(sanitizeHtml('x'), 'x'); + assert.equal(sanitizeHtml('x'), 'x'); + assert.equal(sanitizeHtml('x'), 'x'); + assert.equal(sanitizeHtml('