-3

How can i convert this text?

From this:

Also known as "test".

To this:

Also known as "test"
Jim D.
  • 45
  • 7
  • [Unescape HTML entities in Javascript?](https://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript) – Jonathan Lonowski Apr 08 '18 at 02:36
  • 2
    Welcome to Stack Overflow. When you created your account here, it was suggested you take the [tour] and read the [help] pages in order to familiarize yourself with the site. Please do so before posting your next question here. – Ken White Apr 08 '18 at 02:37
  • I would recommend using the string.replace functions –  Apr 08 '18 at 02:51
  • Perhaps this can help: https://www.pythoncentral.io/encoding-and-decoding-strings-in-python-3-x/ – SDsolar Apr 08 '18 at 03:26
  • Possible duplicate of [HTML to readable text](https://stackoverflow.com/questions/18544284/html-to-readable-text) – Manmohan_singh Apr 08 '18 at 03:31

2 Answers2

1

With NodeJS you can use a popular package called entities:

const entities = require("entities");
entities.decodeHTML("Also known as "test"");
// outputs: Also known as "test"
isflavior
  • 120
  • 1
  • 4
  • 9
0

You can use the replace function

'Also known as "test"'.replace(/"/g,'');

The g flag is used with the regex to replace all the instances.

Rahul Gandhi
  • 1,035
  • 1
  • 11
  • 24