Commit 6ed99965 authored by Dheeraj Joshi's avatar Dheeraj Joshi Committed by Simon Knox

Docs: Update JS Sanitize Library

parent 56614675
......@@ -346,9 +346,9 @@ To avoid this error, use the applicable HTML entity code (`<` or `>`) inst
- In JavaScript:
```javascript
import sanitize from 'sanitize-html';
import { sanitize } from 'dompurify';
const i18n = { LESS_THAN_ONE_HOUR: sanitize(__('In < 1 hours'), { allowedTags: [] }) };
const i18n = { LESS_THAN_ONE_HOUR: sanitize(__('In < 1 hour'), { ALLOWED_TAGS: [] }) };
// ... using the string
element.innerHTML = i18n.LESS_THAN_ONE_HOUR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment