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