Commit 1a1268bd authored by Simon Knox's avatar Simon Knox

Merge branch 'patch-227' into 'master'

Docs: Update JS Sanitize Library

See merge request gitlab-org/gitlab!39843
parents 56614675 6ed99965
......@@ -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