Browse Source

fix/improve url validation using regular expressions

keigo-h 4 years ago
parent
commit
d040426fac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/app/src/client/services/ShowPageAccessories.tsx

+ 1 - 1
packages/app/src/client/services/ShowPageAccessories.tsx

@@ -13,7 +13,7 @@ const ShowPageAccessoriesModal = (): JSX.Element => {
   useEffect(() => {
     const pageIdParams = getURLQueryParamValue('compare');
     if (pageIdParams != null) {
-      if (pageIdParams.split('...').length > 1) {
+      if (pageIdParams.search(/.{24}\.{3}.{24}/) !== -1) {
         openPageAccessories(PageAccessoriesModalContents.PageHistory);
       }
     }