Escape single quote with numerical html character code rather than hex.

Former-commit-id: aef76d2662a065affc21ff735de526a177b50546
This commit is contained in:
Timmy Willison
2013-02-08 14:54:12 -05:00
parent db29699927
commit ce0441694d
6 changed files with 18 additions and 14 deletions

View File

@@ -575,6 +575,10 @@
equal(_.escape('/'), '/');
});
test('should escape "\'" to "'"', function() {
equal(_.escape("'"), "'");
});
test('should return an empty string when passed `null` or `undefined`', function() {
equal(_.escape(null), '');
equal(_.escape(undefined), '');
@@ -2382,7 +2386,7 @@
QUnit.module('lodash.unescape');
(function() {
var escaped = '<h1>Moe's famous "death by chocolate" brownies & cake<\/h1>',
var escaped = '<h1>Moe's famous "death by chocolate" brownies & cake<\/h1>',
unescaped = '<h1>Moe\'s famous "death by chocolate" brownies & cake<\/h1>';
test('should unescape entities in the correct order', function() {