aboutsummaryrefslogtreecommitdiffstats
path: root/dgbuilder/dgeflows/node_modules/serve-static/node_modules/escape-html/index.js
blob: 276521145c189a1f919542d77c9fcc9493e8b617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * Escape special characters in the given string of html.
 *
 * @param  {String} html
 * @return {String}
 * @api private
 */

module.exports = function(html) {
  return String(html)
    .replace(/&/g, '&')
    .replace(/"/g, '"')
    .replace(/'/g, ''')
    .replace(/</g, '&lt;')
    .replace(/>/g, '&gt;');
}