Skip to content

Commit 1fd052d

Browse files
benelliottbenelliottgsa
authored andcommitted
Add documentation for preserveEscapedAttributes option
1 parent 2da8c58 commit 1fd052d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,15 @@ disallowedTagsMode: `recursiveEscape`
738738

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

741+
#### Escape the disallowed tag, including all its attributes.
742+
743+
By default, disallowed attributes are stripped from escaped tags. You can set `preserveEscapedAttributes` to `true` to
744+
keep them as-is.
745+
746+
```js
747+
preserveEscapedAttributes: true
748+
```
749+
741750
### Ignore style attribute contents
742751

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

0 commit comments

Comments
 (0)