Skip to content

Commit

Permalink
Add documentation for preserveEscapedAttributes option
Browse files Browse the repository at this point in the history
  • Loading branch information
benelliott authored and benelliottgsa committed Jul 8, 2024
1 parent 2da8c58 commit 1fd052d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,15 @@ disallowedTagsMode: `recursiveEscape`

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

#### Escape the disallowed tag, including all its attributes.

By default, disallowed attributes are stripped from escaped tags. You can set `preserveEscapedAttributes` to `true` to
keep them as-is.

```js
preserveEscapedAttributes: true
```

### Ignore style attribute contents

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

0 comments on commit 1fd052d

Please sign in to comment.