mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Escape single quote with numerical html character code rather than hex.
Former-commit-id: aef76d2662a065affc21ff735de526a177b50546
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user