diff --git a/lib/util.js b/lib/util.js index 1986bae..bb2696c 100644 --- a/lib/util.js +++ b/lib/util.js @@ -12,7 +12,7 @@ const parse = v => { } } -const escapeHtml = s => { +export const escapeHtml = s => { if (typeof s === 'string') { return s .replace(/= 0 ? str.substr(0, qI) : str) - .replace(//g, '>') - .replace(/\//g, '/') + return escapeHtml(qI >= 0 ? str.substr(0, qI) : str) } export default Index