Fix escape error

main
Mike Fix 7 years ago
parent bb4eb1ed9a
commit abb0948324

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

Loading…
Cancel
Save