From 12001bd64a051f61987fd6db071233b02a997a1b Mon Sep 17 00:00:00 2001 From: Michael Fix Date: Wed, 17 Jul 2019 20:06:30 -0700 Subject: [PATCH] fix encoding again (#823) --- components/Editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/Editor.js b/components/Editor.js index 958f631..3895d82 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -146,9 +146,9 @@ class Editor extends React.Component { if (isPNG) { node.querySelectorAll('span[role="presentation"]').forEach(node => { - if (node.innerText && node.innerText.match(/%[A-Za-z0-9]{2}/)) { + if (node.innerText && node.innerText.match(/%[A-Fa-f0-9]{2}/)) { map.set(node, node.innerHTML) - node.innerText.match(/%[A-Za-z0-9]{2}/g).forEach(t => { + node.innerText.match(/%[A-Fa-f0-9]{2}/g).forEach(t => { node.innerText = node.innerText.replace(t, encodeURIComponent(t)) }) }