forked from DebaucheryLibrarian/traxxx
11 lines
236 B
JavaScript
11 lines
236 B
JavaScript
|
function escapeHtml(text) {
|
||
|
return text
|
||
|
.replace(/&/g, '&')
|
||
|
.replace(/</g, '<')
|
||
|
.replace(/>/g, '>')
|
||
|
.replace(/"/g, '"')
|
||
|
.replace(/'/g, ''');
|
||
|
}
|
||
|
|
||
|
module.exports = escapeHtml;
|