Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
aa5a034e2f
3 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  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 Dosyayı Görüntüle

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

+ 1
- 0
spec/_files/escaped.mustache Dosyayı Görüntüle

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

+ 1
- 0
spec/_files/escaped.txt Dosyayı Görüntüle

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

Yükleniyor…
İptal
Kaydet