Skip to content
Myr

Escaping sample chat app messages

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent a63df2b · Browse files · 2 files+6 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−7 removed

  • other:+6 added−7 removed

2 files+6 added−7 removed

modified:examples/app.js+1 added-1 removed
modified:lib/express/helpers.js+5 added-6 removed
41 unmodified lines
42 * @api public43 */4445exports.escape = function(html) {46 if (html instanceof String)47 return html48 .replace(/&/g, '&amp;')49 .replace(/"/g, '&quot;')50 .replace(/</g, '&lt;')51 .replace(/>/g, '&gt;')46 return html.toString()47 .replace(/&/g, '&amp;')48 .replace(/"/g, '&quot;')49 .replace(/</g, '&lt;')50 .replace(/>/g, '&gt;')51}5253/**54 * Convert native array-like objects into an
85 unmodified lines