Remove HTML tags

Hi

I have been trying to remove HTML tags by function but without success.

This is the text I want to make clean: ¨

"<p>Detta &auml;r ett test f&ouml;r att visa nils hur det fungerar&nbsp;</p>

Outcome should be

"

Detta är ett test för att visa nils hur det fungerar 

That question is actually more JavaScript related than n8n and you should find help if you check on Google. So like something like this:

You would then get something like this:

const content = "<p>Detta &auml;r ett test f&ouml;r att visa nils hur det fungerar&nbsp;</p>"
const cleanContent = content.replace(/(<([^>]+)>)/ig, '').replace(/&auml;/ig, 'ä');

For each special character like the “ä” you would then have to add another .replace(/&auml;/ig, 'ä').