Add ` as a character to escape/unescape and a doc note on unquoted html attribute values.

This commit is contained in:
John-David Dalton
2014-01-30 09:38:01 -08:00
parent ba8684dfc7
commit 618c8bb5ad
8 changed files with 61 additions and 41 deletions

View File

@@ -2146,8 +2146,8 @@
QUnit.module('lodash.escape');
(function() {
var escaped = '&<>"'\/',
unescaped = '&<>"\'\/';
var escaped = '&amp;&lt;&gt;&quot;&#39;&#96;\/',
unescaped = '&<>"\'`\/';
test('should escape values', 1, function() {
equal(_.escape(unescaped), escaped);
@@ -8209,8 +8209,8 @@
QUnit.module('lodash.unescape');
(function() {
var escaped = '&amp;&lt;&gt;&quot;&#39;\/',
unescaped = '&<>"\'\/';
var escaped = '&amp;&lt;&gt;&quot;&#39;&#96;\/',
unescaped = '&<>"\'`\/';
test('should unescape entities in the correct order', 1, function() {
equal(_.unescape('&amp;lt;'), '&lt;');