From: Dessalines Date: Tue, 2 Feb 2021 17:18:18 +0000 (-0500) Subject: Fixing uri protected params getting clipped from cross posts. Fixes #141 X-Git-Url: http://these/git/%24%7BgetStaticDir%28%29%7D/styles/%7B%60https:/%7BjoinLemmyUrl%7D?a=commitdiff_plain;h=f9eeabb2f9963f9fbafd0c7fe0f2f5d9304975ef;p=lemmy-ui.git Fixing uri protected params getting clipped from cross posts. Fixes #141 --- diff --git a/src/shared/components/post-listing.tsx b/src/shared/components/post-listing.tsx index 41494c2..d75584b 100644 --- a/src/shared/components/post-listing.tsx +++ b/src/shared/components/post-listing.tsx @@ -1260,13 +1260,13 @@ export class PostListing extends Component { 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; }