Skip to content

Commit 3d2893e

Browse files
benelliottbenelliottgsa
authored andcommitted
Add documentation for preserveEscapedAttributes option
1 parent ae1dc35 commit 3d2893e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,15 @@ disallowedTagsMode: `recursiveEscape`
753753

754754
This will transform `<disallowed>hello<p>world</p></disallowed>` to `&lt;disallowed&gt;hello&lt;p&gt;world&lt;/p&gt;&lt;/disallowed&gt;`
755755

756+
#### Escape the disallowed tag, including all its attributes.
757+
758+
By default, disallowed attributes are stripped from escaped tags. You can set `preserveEscapedAttributes` to `true` to
759+
keep them as-is.
760+
761+
```js
762+
preserveEscapedAttributes: true
763+
```
764+
756765
### Ignore style attribute contents
757766

758767
Instead of discarding faulty style attributes, you can allow them by disabling the parsing of style attributes:

0 commit comments

Comments
 (0)