Skip to content

Commit

Permalink
fix(search): handle multi-sub search
Browse files Browse the repository at this point in the history
  • Loading branch information
sigaloid committed Sep 25, 2024
1 parent e6273e2 commit f553614
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ pub async fn find(req: Request<Body>) -> Result<Response<Body>, String> {
} else {
""
};
let path = format!("{}.json?{}{}&raw_json=1", req.uri().path(), req.uri().query().unwrap_or_default(), nsfw_results);
let uri_path = req.uri().path().replace("+", "%2B");
let path = format!("{}.json?{}{}&raw_json=1", uri_path, req.uri().query().unwrap_or_default(), nsfw_results);
let mut query = param(&path, "q").unwrap_or_default();
query = REDDIT_URL_MATCH.replace(&query, "").to_string();

Expand Down

0 comments on commit f553614

Please sign in to comment.