From 628ad0fcb2dea232a78b635315833a38e58ccc79 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 15 May 2012 02:16:50 -0400 Subject: [PATCH] Add comment to `_.escape`. Former-commit-id: bee148c238552d3cdb6bba3a3511f3d0c5484850 --- lodash.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lodash.js b/lodash.js index f29d58873..6dbcef9dc 100644 --- a/lodash.js +++ b/lodash.js @@ -2675,6 +2675,9 @@ * // => "Curly, Larry & Moe" */ function escape(string) { + // the `>` character doesn't require escaping in HTML and has no special + // meaning unless it's part of an open tag + // http://mathiasbynens.be/notes/ambiguous-ampersands (semi-related fun fact) return (string + '') .replace(/&/g, '&') .replace(/