sanitize-html 2.0.0 → 2.1.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 +9 -3
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.0 (2020-10-07):
|
|
4
|
+
- `sup` added to the default allowed tags list. Thanks to [Julian Lam](https://github.com/julianlam) for the contribution.
|
|
5
|
+
- Updates default `allowedTags` README documentation. Thanks to [Marco Arduini](https://github.com/nerfologist) for the contribution.
|
|
6
|
+
|
|
3
7
|
## 2.0.0 (2020-09-23):
|
|
4
8
|
- `nestingLimit` option added.
|
|
5
9
|
- Updates ESLint config package and fixes warnings.
|
package/README.md
CHANGED
|
@@ -98,9 +98,15 @@ Boom!
|
|
|
98
98
|
### Default options
|
|
99
99
|
|
|
100
100
|
```js
|
|
101
|
-
allowedTags: [
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
allowedTags: [
|
|
102
|
+
"address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4",
|
|
103
|
+
"h5", "h6", "hgroup", "main", "nav", "section", "blockquote", "dd", "div",
|
|
104
|
+
"dl", "dt", "figcaption", "figure", "hr", "li", "main", "ol", "p", "pre",
|
|
105
|
+
"ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn",
|
|
106
|
+
"em", "i", "kbd", "mark", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp",
|
|
107
|
+
"small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "caption",
|
|
108
|
+
"col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr"
|
|
109
|
+
],
|
|
104
110
|
disallowedTagsMode: 'discard',
|
|
105
111
|
allowedAttributes: {
|
|
106
112
|
a: [ 'href', 'name', 'target' ],
|
package/index.js
CHANGED
|
@@ -688,7 +688,7 @@ sanitizeHtml.defaults = {
|
|
|
688
688
|
'a', 'abbr', 'b', 'bdi', 'bdo', 'br', 'cite', 'code', 'data', 'dfn',
|
|
689
689
|
'em', 'i', 'kbd', 'mark', 'q',
|
|
690
690
|
'rb', 'rp', 'rt', 'rtc', 'ruby',
|
|
691
|
-
's', 'samp', 'small', 'span', 'strong', 'sub', 'time', 'u', 'var', 'wbr',
|
|
691
|
+
's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time', 'u', 'var', 'wbr',
|
|
692
692
|
// Table content
|
|
693
693
|
'caption', 'col', 'colgroup', 'table', 'tbody', 'td', 'tfoot', 'th',
|
|
694
694
|
'thead', 'tr'
|
package/package.json
CHANGED