Skip to content

Commit 83e66a8

Browse files
authored
Update README.md
1 parent ba0e053 commit 83e66a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ const clean = DOMPurify.sanitize(dirty, {ADD_URI_SAFE_ATTR: ['my-attr']});
303303
const clean = DOMPurify.sanitize(dirty, {ALLOW_UNKNOWN_PROTOCOLS: true});
304304

305305
// allow specific protocols handlers in URL attributes via regex (default is false, be careful, XSS risk)
306-
// by default only http, https, ftp, ftps, tel, mailto, callto, sms, cid and xmpp are allowed.
306+
// by default only (protocol-)relative URLs, http, https, ftp, ftps, tel, mailto, callto, sms, cid and xmpp are allowed.
307307
// Default RegExp: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;
308308
const clean = DOMPurify.sanitize(dirty, {ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|xxx):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i});
309309

0 commit comments

Comments
 (0)