Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
licitdev committed Sep 9, 2022
1 parent 19eb6d2 commit b811f35
Show file tree
Hide file tree
Showing 8 changed files with 7,968 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [licitdev]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
dist
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"useTabs": true,
"printWidth": 120,
"proseWrap": "always",
"semi": true
}
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Directus Extension - Sanitize HTML

Sanitize HTML inputs with the [sanitize-html](https://www.npmjs.com/package/sanitize-html) package.

## Installation

```
npm install directus-extension-sanitize-html
```

## Options

### Customize which event scopes to sanitize

Add the `EXT_SANITIZE_HTML_EVENT_SCOPES` environment variable with the event scopes separated by commas.

Defaults to running `items.create,items.update`.

Example: `articles.items.create,articles.items.update`

### Customize which paths to omit for sanitization

Add the `EXT_SANITIZE_HTML_OMIT_PATHS` environment variable with the `<collection>.path` separated by commas.

Defaults to no path to omit.

Example: `articles.content,website.rawHtml`
Loading

0 comments on commit b811f35

Please sign in to comment.