From 71964ef5789bd2d70e6e86628597e799f92443d1 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 30 Nov 2021 00:15:26 -0600 Subject: [PATCH] added raw_json=1 to GET request for searches in order to get unescaped HTML from reddit json API --- src/search.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.rs b/src/search.rs index 0eef077..03d2a77 100644 --- a/src/search.rs +++ b/src/search.rs @@ -47,7 +47,7 @@ struct SearchTemplate { // SERVICES pub async fn find(req: Request) -> Result, String> { let nsfw_results = if setting(&req, "show_nsfw") == "on" { "&include_over_18=on" } else { "" }; - let path = format!("{}.json?{}{}", req.uri().path(), req.uri().query().unwrap_or_default(), nsfw_results); + let path = format!("{}.json?raw_json=1&{}{}", req.uri().path(), req.uri().query().unwrap_or_default(), nsfw_results); let query = param(&path, "q").unwrap_or_default(); if query.is_empty() {