sync up dom-to-image filter w/ custom one for Safari

main
Mike Fix 6 years ago
parent 02d2a9592f
commit e2e8e342d2

@ -26,11 +26,11 @@ module.exports = browser => async (req, res) => {
filter: n => {
// %[00 -> 19] cause failures
if (
n.innerText && n.innerText.match(/%[0-1][0-9]/) &&
n.innerText && n.innerText.match(/%\S\S/) &&
n.className &&
n.className.startsWith('cm-') // is CodeMirror primitive string
) {
n.innerText = n.innerText.replace('%', '%25')
n.innerText = encodeURIComponent(n.innerText)
}
if (n.className) {
return String(n.className).indexOf('eliminateOnRender') < 0

Loading…
Cancel
Save