Przeglądaj źródła

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.
tags/0.4.1
Eric Bréchemier 14 lat temu
rodzic
commit
aa5a034e2f
3 zmienionych plików z 3 dodań i 0 usunięć
  1. +1
    -0
      spec/_files/escaped.js
  2. +1
    -0
      spec/_files/escaped.mustache
  3. +1
    -0
      spec/_files/escaped.txt

+ 1
- 0
spec/_files/escaped.js Wyświetl plik

@@ -2,5 +2,6 @@ var escaped = {
title: function() {
return "Bear > Shark";
},
subtitle: 'Rock 'n Roll',
entities: """
};

+ 1
- 0
spec/_files/escaped.mustache Wyświetl plik

@@ -1,2 +1,3 @@
<h1>{{title}}</h1>
<h2>{{subtitle}}</h2>
But not {{entities}}.

+ 1
- 0
spec/_files/escaped.txt Wyświetl plik

@@ -1,2 +1,3 @@
<h1>Bear &gt; Shark</h1>
<h2>Rock &#39;n Roll</h2>
But not &quot;.

Ładowanie…
Anuluj
Zapisz