mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Make _.escape escape backticks as well
In Internet Explorer ≤ 8, the backtick character can be used to break out of unquoted attribute values or HTML comments. See http://html5sec.org/#102, http://html5sec.org/#108, and http://html5sec.org/#133.
This commit is contained in:
@@ -2372,8 +2372,8 @@
|
||||
QUnit.module('lodash.escape');
|
||||
|
||||
(function() {
|
||||
var escaped = '&<>"'\/',
|
||||
unescaped = '&<>"\'\/';
|
||||
var escaped = '&<>"'`\/',
|
||||
unescaped = '&<>"\'`\/';
|
||||
|
||||
test('should escape values', 1, function() {
|
||||
strictEqual(_.escape(unescaped), escaped);
|
||||
|
||||
Reference in New Issue
Block a user