fix(search): handle multi-sub search (#263)

This commit is contained in:
Matthew Esposito 2024-09-24 23:20:12 -04:00 committed by GitHub
parent e6273e2ed5
commit 72f7d9d08c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();