Fixing uri protected params getting clipped from cross posts. Fixes #141

This commit is contained in:
Dessalines 2021-02-02 12:18:18 -05:00
parent 6a75db6887
commit f9eeabb2f9

View file

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