From aa5a034e2f3cb6393efc8c67cdc87ca22af9e065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Br=C3=A9chemier?= Date: Mon, 20 Feb 2012 12:28:46 +0100 Subject: [PATCH] Add unit test for bug: extra escaping of & in ' entity for apostrophe When found in a replacement value, ' should be left untouched, not escaped as ' which makes the entity visible instead of displaying an apostrophe in a browser. --- spec/_files/escaped.js | 1 + spec/_files/escaped.mustache | 1 + spec/_files/escaped.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/spec/_files/escaped.js b/spec/_files/escaped.js index 7a8baef..875776a 100644 --- a/spec/_files/escaped.js +++ b/spec/_files/escaped.js @@ -2,5 +2,6 @@ var escaped = { title: function() { return "Bear > Shark"; }, + subtitle: 'Rock 'n Roll', entities: """ }; diff --git a/spec/_files/escaped.mustache b/spec/_files/escaped.mustache index ea25951..b8f82d0 100644 --- a/spec/_files/escaped.mustache +++ b/spec/_files/escaped.mustache @@ -1,2 +1,3 @@

{{title}}

+

{{subtitle}}

But not {{entities}}. diff --git a/spec/_files/escaped.txt b/spec/_files/escaped.txt index 73ac5ce..7f750d4 100644 --- a/spec/_files/escaped.txt +++ b/spec/_files/escaped.txt @@ -1,2 +1,3 @@

Bear > Shark

+

Rock 'n Roll

But not ".