Fix escape error

main
Mike Fix 7 years ago
parent bb4eb1ed9a
commit abb0948324

@ -9,11 +9,14 @@ const parse = v => {
} catch (e) {}
}
const escapeHtml = s =>
s
const escapeHtml = s => {
if (typeof s === 'string') {
return s
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\//g, '&#x2F;')
}
}
export const parseRGBA = obj => `rgba(${obj.r},${obj.g},${obj.b},${obj.a})`

Loading…
Cancel
Save