diff --git a/src/post.rs b/src/post.rs index 31d3be7..b207661 100644 --- a/src/post.rs +++ b/src/post.rs @@ -81,7 +81,7 @@ async fn parse_post(json: &serde_json::Value) -> Post { id: val(post, "id"), title: val(post, "title"), community: val(post, "subreddit"), - body: rewrite_url(&val(post, "selftext_html")), + body: rewrite_urls(&val(post, "selftext_html")).replace("\\", ""), author: Author { name: val(post, "author"), flair: Flair { @@ -151,7 +151,7 @@ async fn parse_comments(json: &serde_json::Value) -> Vec { let (rel_time, created) = time(unix_time); let score = comment["data"]["score"].as_i64().unwrap_or(0); - let body = rewrite_url(&val(&comment, "body_html")); + let body = rewrite_urls(&val(&comment, "body_html")); let replies: Vec = if comment["data"]["replies"].is_object() { parse_comments(&comment["data"]["replies"]).await