Kaynağa Gözat

fix: ignore case for entire @include/exclude in tld mode

tophf 5 yıl önce
ebeveyn
işleme
6b90d18c36
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      src/background/utils/tester.js

+ 2 - 2
src/background/utils/tester.js

@@ -104,9 +104,9 @@ function autoReg(str) {
     const reTldStr = reStr.replace('\\.tld/', '((?:\\.\\w+)+)/');
     return {
       test: (tstr) => {
-        const matches = tstr.match(reTldStr);
+        const matches = tstr.toLowerCase().match(reTldStr);
         if (matches) {
-          const suffix = matches[1].slice(1).toLowerCase();
+          const suffix = matches[1].slice(1);
           if (tld.getPublicSuffix(suffix) === suffix) return true;
         }
         return false;