Explorar el Código

fix/improve url validation using regular expressions

keigo-h hace 4 años
padre
commit
d040426fac
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
       }
     }