From ca880a61bf8f7281cc5204002c3b09ae3f13c38c Mon Sep 17 00:00:00 2001 From: atomiks Date: Sat, 30 Dec 2017 00:13:15 +1100 Subject: [PATCH] Update unescapeHTML.md --- snippets/unescapeHTML.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/unescapeHTML.md b/snippets/unescapeHTML.md index add33a861..3325e1400 100644 --- a/snippets/unescapeHTML.md +++ b/snippets/unescapeHTML.md @@ -5,7 +5,7 @@ Unescapes escaped HTML characters. Use `String.replace()` with a regex that matches the characters that need to be escaped, using a callback function to replace each escaped character instance with its associated unescaped character using a dictionary (object). ```js -const unescapeHTML = str => str.replace(/[&<>'"]/g, tag => ({ +const unescapeHTML = str => str.replace(/&|<|>|'|"/g, tag => ({ '&': '&', '<': '<', '>': '>',