From 1971a5728c8e4879203209db77f384206fe81ecc Mon Sep 17 00:00:00 2001 From: Zade Viggers <74938858+zadeviggers@users.noreply.github.com> Date: Tue, 25 Jan 2022 14:16:11 +1300 Subject: [PATCH] Update defaults in readme --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 414984a..d949bf4 100644 --- a/README.md +++ b/README.md @@ -128,10 +128,9 @@ allowedTags: [ disallowedTagsMode: 'discard', allowedAttributes: { a: [ 'href', 'name', 'target' ], - // We don't currently allow img itself by default, but this - // would make sense if we did. You could add srcset here, - // and if you do the URL is checked for safety - img: [ 'src' ] + // We don't currently allow img itself by default, but + // these attributes would make sense if we did. + img: [ 'src', 'srcset', 'alt', 'title', 'width', 'height', 'loading' ] }, // Lots of these won't come up by default because we don't allow them selfClosing: [ 'img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta' ],