Added missing utils class

pull/40/head
Piero Toffanin 2016-10-28 15:40:19 -04:00
rodzic e0c3c71144
commit 7a089ada79
1 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,17 @@
let escapeEntityMap = {
"&": "&",
"<": "&lt;",
">": "&gt;",
'"': '&quot;',
"'": '&#39;',
"/": '&#x2F;'
};
export default {
escapeHtml: function(string) {
return String(string).replace(/[&<>"'\/]/g, function (s) {
return escapeEntityMap[s];
});
}
};