Procházet zdrojové kódy

Fix "Copy to clipboard" anchor link

Koki Oyatsu před 5 roky
rodič
revize
fb8e599d2b
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/client/js/components/Page/CopyDropdown.jsx

+ 2 - 2
src/client/js/components/Page/CopyDropdown.jsx

@@ -62,7 +62,7 @@ class CopyDropdown extends React.Component {
 
   generatePagePathUrl() {
     const { origin } = window.location;
-    return `${origin}${this.generatePagePathWithParams()}`;
+    return `${origin}${encodeURI(this.generatePagePathWithParams())}`;
   }
 
   generatePermalink() {
@@ -75,7 +75,7 @@ class CopyDropdown extends React.Component {
       return decodeURI(`${origin}/share/${pageId}`);
     }
 
-    return decodeURI(`${origin}/${pageId}${this.uriParams}`);
+    return decodeURI(`${origin}/${pageId}`) + this.uriParams;
   }
 
   generateMarkdownLink() {