Fix multireddit subscription redirect url

This commit is contained in:
spikecodes 2022-05-15 13:50:17 -07:00
parent 01bc729a80
commit bb7fb1313d
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
3 changed files with 115 additions and 129 deletions

View file

@ -97,7 +97,7 @@ pub async fn community(req: Request<Body>) -> Result<Response<Body>, String> {
let path = format!("/r/{}/{}.json?{}&raw_json=1", sub_name.clone(), sort, req.uri().query().unwrap_or_default());
let url = String::from(req.uri().path_and_query().map_or("", |val| val.as_str()));
let redirect_url = url[1..].replace('?', "%3F").replace('&', "%26");
let redirect_url = url[1..].replace('?', "%3F").replace('&', "%26").replace('+',"%2B");
let filters = get_filters(&req);
// If all requested subs are filtered, we don't need to fetch posts.