Переглянути джерело

fix: simplify BAD_URL_CHAR

tophf 3 роки тому
батько
коміт
a32167d878
1 змінених файлів з 1 додано та 3 видалено
  1. 1 3
      src/background/utils/preinject.js

+ 1 - 3
src/background/utils/preinject.js

@@ -35,9 +35,7 @@ const KEY_EXPOSE = 'expose';
 const KEY_DEF_INJECT_INTO = 'defaultInjectInto';
 const KEY_IS_APPLIED = 'isApplied';
 const KEY_XHR_INJECT = 'xhrInject';
-const BAD_URL_CHAR = IS_FIREFOX
-  ? /[#&',/:;?=+]/g // FF shows `@` fine as ASCII but mangles it as full-width
-  : /[#&',/:;?=+@]/g;
+const BAD_URL_CHAR = /[#/?]/g; // will be encoded to avoid splitting the URL in devtools UI
 const GRANT_NONE_VARS = '{GM,GM_info,unsafeWindow,cloneInto,createObjectIn,exportFunction}';
 const expose = {};
 let isApplied;