]> Untitled Git - lemmy-ui.git/commitdiff
Fixing uri protected params getting clipped from cross posts. Fixes #141
authorDessalines <tyhou13@gmx.com>
Tue, 2 Feb 2021 17:18:18 +0000 (12:18 -0500)
committerDessalines <tyhou13@gmx.com>
Tue, 2 Feb 2021 17:18:18 +0000 (12:18 -0500)
src/shared/components/post-listing.tsx

index 41494c2fa4fef7ebc18fd2e47f3eda073f0eecdc..d75584bd4d528a9a5aeb2362eceac3e5b9becd0c 100644 (file)
@@ -1260,13 +1260,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
 
   get crossPostParams(): string {
     let post = this.props.post_view.post;
-    let params = `?title=${post.name}`;
+    let params = `?title=${encodeURIComponent(post.name)}`;
 
     if (post.url) {
       params += `&url=${encodeURIComponent(post.url)}`;
     }
     if (post.body) {
-      params += `&body=${post.body}`;
+      params += `&body=${encodeURIComponent(post.body)}`;
     }
     return params;
   }