codergautamyt

htmlDecode.js

Jun 30th, 2020 (edited)
261
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Usage: htmldecode("&quot");
  2. //returns '"' (double quotes)
  3. function htmldecode(input) {
  4. var parser = new DOMParser().parseFromString(input, "text/html");
  5. return parser.documentElement.textContent;
  6. }
RAW Paste Data