Code Review
/
sdnc
/
oam.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Fix license issues
[sdnc/oam.git]
/
dgbuilder
/
dgeflows
/
node_modules
/
serve-static
/
node_modules
/
escape-html
/
index.js
1
/**
2
* Escape special characters in the given string of html.
3
*
4
* @param {String} html
5
* @return {String}
6
* @api private
7
*/
8
9
module.exports = function(html) {
10
return String(html)
11
.replace(/&/g, '&')
12
.replace(/"/g, '"')
13
.replace(/'/g, ''')
14
.replace(/</g, '<')
15
.replace(/>/g, '>');
16
}