Skip to content
Myr

Added escape()

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

authored by visionmedia · committed by visionmedia · parent 744bfa8 · Browse files · 2 files+22 added−0 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+22 added−0 removed

  • tests:+6 added−0 removed
  • other:+16 added−0 removed

2 files+22 added−0 removed

modified:lib/express.core.js+16 added
179 unmodified lines
180 puts(JSON.stringify(object))181 },182 183 /**184 * Escape special characters in _html_.185 *186 * @param {string} html187 * @return {string}188 * @api public189 */190 191 escape : function(html) {192 return html.193 replace(/&/g, '&amp;').194 replace(/"/g, '&quot;').195 replace(/</g, '&lt;').196 replace(/>/g, '&gt;')197 },198 199 /**200 * Attept to match and call a route for 201 * the given _request_, returning the data202 * returned by the route callback.203 *
89 unmodified lines
modified:spec/spec.core.js+6 added