From 4a002065263d87bc2d35a2338f4f6b249b9b47e6 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Wed, 12 Dec 2018 10:16:39 -0800 Subject: [PATCH] fix filter regex for encoded characters Closes #564 (again) --- components/Editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Editor.js b/components/Editor.js index cf396cd..d57a026 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -144,7 +144,7 @@ class Editor extends React.Component { if (isPNG) { node.querySelectorAll('span[role="presentation"]').forEach(node => { - if (node.innerText && node.innerText.match(/%\S\S/)) { + if (node.innerText && node.innerText.match(/%[A-Za-z0-9]{2}/)) { map.set(node, node.innerText) node.innerText = encodeURIComponent(node.innerText) }