From d49f5366211b50b541b2181d1f98f4f3d52bb812 Mon Sep 17 00:00:00 2001 From: atomiks Date: Sat, 30 Dec 2017 00:08:55 +1100 Subject: [PATCH] Update unescapeString.md --- snippets/unescapeString.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/unescapeString.md b/snippets/unescapeString.md index 8408fc744..add33a861 100644 --- a/snippets/unescapeString.md +++ b/snippets/unescapeString.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 escapeHTML = str => str.replace(/[&<>'"]/g, tag => ({ +const unescapeHTML = str => str.replace(/[&<>'"]/g, tag => ({ '&': '&', '<': '<', '>': '>',