Created
April 27, 2018 10:27
-
-
Save nkint/7754d2e8e8de6c3bb0f5af34c74910b8 to your computer and use it in GitHub Desktop.
Escape character "
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function htmlDecode(input) { | |
var doc = new window.DOMParser().parseFromString(input, 'text/html') | |
return unescape(doc.documentElement.textContent) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment