Steven Fukase há 4 anos atrás
pai
commit
2cccd38c50
1 ficheiros alterados com 2 adições e 13 exclusões
  1. 2 13
      src/client/js/components/PageCreateModal.jsx

+ 2 - 13
src/client/js/components/PageCreateModal.jsx

@@ -70,33 +70,22 @@ const PageCreateModal = (props) => {
     setTemplate(value);
   }
 
-  /**
-   * encode except slashes
-   */
-  function encodeExceptSlashes(path) {
-    return path
-      .split('/')
-      .map(item => encodeURIComponent(item))
-      .join('/');
-  }
   /**
    * access today page
    */
   function createTodayPage() {
     let tmpTodayInput1 = todayInput1;
-    const tmpTodayInput2 = encodeExceptSlashes(todayInput2);
     if (tmpTodayInput1 === '') {
       tmpTodayInput1 = t('Memo');
     }
-    tmpTodayInput1 = encodeExceptSlashes(tmpTodayInput1);
-    window.location.href = urljoin(userPageRootPath, tmpTodayInput1, now, tmpTodayInput2, '#edit');
+    window.location.href = encodeURI(urljoin(userPageRootPath, tmpTodayInput1, now, todayInput2, '#edit'));
   }
 
   /**
    * access input page
    */
   function createInputPage() {
-    window.location.href = urljoin(encodeExceptSlashes(pageNameInput), '#edit');
+    window.location.href = encodeURI(urljoin(pageNameInput, '#edit'));
   }
 
   function ppacInputChangeHandler(value) {