sanitize-html 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +3 -4
- package/index.js +3 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -128,10 +128,9 @@ allowedTags: [
|
|
|
128
128
|
disallowedTagsMode: 'discard',
|
|
129
129
|
allowedAttributes: {
|
|
130
130
|
a: [ 'href', 'name', 'target' ],
|
|
131
|
-
// We don't currently allow img itself by default, but
|
|
132
|
-
// would make sense if we did.
|
|
133
|
-
|
|
134
|
-
img: [ 'src' ]
|
|
131
|
+
// We don't currently allow img itself by default, but
|
|
132
|
+
// these attributes would make sense if we did.
|
|
133
|
+
img: [ 'src', 'srcset', 'alt', 'title', 'width', 'height', 'loading' ]
|
|
135
134
|
},
|
|
136
135
|
// Lots of these won't come up by default because we don't allow them
|
|
137
136
|
selfClosing: [ 'img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta' ],
|
package/index.js
CHANGED
|
@@ -780,10 +780,9 @@ sanitizeHtml.defaults = {
|
|
|
780
780
|
disallowedTagsMode: 'discard',
|
|
781
781
|
allowedAttributes: {
|
|
782
782
|
a: [ 'href', 'name', 'target' ],
|
|
783
|
-
// We don't currently allow img itself by default, but
|
|
784
|
-
// would make sense if we did.
|
|
785
|
-
|
|
786
|
-
img: [ 'src' ]
|
|
783
|
+
// We don't currently allow img itself by default, but
|
|
784
|
+
// these attributes would make sense if we did.
|
|
785
|
+
img: [ 'src', 'srcset', 'alt', 'title', 'width', 'height', 'loading' ]
|
|
787
786
|
},
|
|
788
787
|
// Lots of these won't come up by default because we don't allow them
|
|
789
788
|
selfClosing: [ 'img', 'br', 'hr', 'area', 'base', 'basefont', 'input', 'link', 'meta' ],
|
package/package.json
CHANGED