2
0
yusuketk 5 жил өмнө
parent
commit
030ee0b33b

+ 1 - 1
src/client/js/components/PageEditor/LinkEditModal.jsx

@@ -169,7 +169,7 @@ class LinkEditModal extends React.PureComponent {
     let permalink = '';
 
     if (path.startsWith('/')) {
-      const pathWithoutFragment = path.split('#')[0];
+      const pathWithoutFragment = new URL(path, 'http://dummy').pathname;
       const isPermanentLink = validator.isMongoId(pathWithoutFragment.slice(1));
       const pageId = isPermanentLink ? pathWithoutFragment.slice(1) : null;