0

I have a number of strings that have various HTML encoded characters such as ', & etc. Is there a way to convert these into plain character strings other than a bunch of str.replace(/'/g, "'") type statements?

1 Answer 1

2

Without direct access to the DOM (and its parser), you'll need to either install a package to do this for you or write one yourself to do all those str.replace(/'/g, "'") type statements.

It looks like there are some good ones on npm:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.