Closed Yvem closed 10 years ago
For the most common escapeHTML
-like functions you only need to escape a couple of characters, i.e. https://github.com/mathiasbynens/he/blob/78bc2bbc95a82d03bfe02247a110db32cfe5854b/he.js#L34-L50. If this functionality is all you need, you probably don’t need he.
he’s main functionality is something else entirely. See https://github.com/mathiasbynens/he/issues/18#issuecomment-42768379 for more info.
Thanks for this quick response !
underscore.string has a function
escapeHtml
https://github.com/epeli/underscore.string#string-functionsjQuery also.
I guess
he
is more robust (as stated in the intro), but may we have facts ?How about perfs ? http://jsperf.com/string-escapehtml