]> Untitled Git - lemmy.git/commitdiff
Encode crosspost url. Fixes #1083 (#1088)
authorDessalines <dessalines@users.noreply.github.com>
Sun, 16 Aug 2020 15:05:45 +0000 (11:05 -0400)
committerGitHub <noreply@github.com>
Sun, 16 Aug 2020 15:05:45 +0000 (11:05 -0400)
ui/src/components/post-listing.tsx

index 9f991d0850e198958d5f93dcba2679c7648389a6..49ec3034311d8ed83596d11af8f41dcbcdc74de7 100644 (file)
@@ -1223,7 +1223,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     let post = this.props.post;
 
     if (post.url) {
-      params += `&url=${post.url}`;
+      params += `&url=${encodeURIComponent(post.url)}`;
     }
     if (this.props.post.body) {
       params += `&body=${this.props.post.body}`;