From 02c4b10f7185a1b1e350ae41912fa2fb0f30500d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gro=CC=88bler?= Date: Thu, 28 Apr 2016 21:52:16 +0200 Subject: [PATCH] added soft-hyphen unescape logic --- .gitignore | 1 + helper/htmlEntities.js | 3 ++- tests/unescapeHTML.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0e531917..3fe7b4f6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .tmp_* node_modules coverage +.idea diff --git a/helper/htmlEntities.js b/helper/htmlEntities.js index 4b78d743..cc088303 100644 --- a/helper/htmlEntities.js +++ b/helper/htmlEntities.js @@ -13,7 +13,8 @@ var htmlEntities = { gt: '>', quot: '"', amp: '&', - apos: '\'' + apos: '\'', + shy: '' }; module.exports = htmlEntities; diff --git a/tests/unescapeHTML.js b/tests/unescapeHTML.js index 583ae050..6d08d482 100644 --- a/tests/unescapeHTML.js +++ b/tests/unescapeHTML.js @@ -28,4 +28,5 @@ test('#unescapeHTML', function(){ equal(unescapeHTML(null), ''); equal(unescapeHTML(undefined), ''); equal(unescapeHTML(5), '5'); + equal(unescapeHTML('­'), ''); });