# Sanitize html: Anynone used dompurify within code node?

**URL:** <https://community.n8n.io/t/sanitize-html-anynone-used-dompurify-within-code-node/29459>\
**Category:** Questions\
**Tags:** html-extract\
**Created:** [August 17, 2023, 9:11am UTC](https://community.n8n.io/t/sanitize-html-anynone-used-dompurify-within-code-node/29459 "2023-08-17T09:11:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![EmeraldHerald](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/emeraldherald/32/35355_2.png) [@EmeraldHerald](https://community.n8n.io/u/EmeraldHerald)\
**Post date:** [August 17, 2023, 2:54pm UTC](https://community.n8n.io/t/sanitize-html-anynone-used-dompurify-within-code-node/29459/3 "2023-08-17T14:54:47Z")

</div>

Hi @Kool_Baudrillard 👋

I might not be too sure on this one, but at the same time - could you post a sample of the HTML you’re looking to sanitise? Make sure there’s nothing sensitive of course, but it might be helpful in building something. Especially if you could also mention why regex wasn’t working so well for you!

If you want to specifically use dompurify, as long as you’re self-hosting you could [add this](http://community.n8n.io/t/installing-additional-module-with-npm/11682) as a module to the code node.

---

_[View the full topic](https://community.n8n.io/t/sanitize-html-anynone-used-dompurify-within-code-node/29459)._
