cleanup-request-rs
Felix Ableitner 2023-10-24 13:44:03 +02:00
parent aaf3833d12
commit 89976b83f6
2 changed files with 2 additions and 2 deletions

View File

@ -800,7 +800,7 @@ pub async fn process_markdown_opt(
slur_regex: &Option<Regex>,
) -> LemmyResult<Option<String>> {
match text {
Some(t) => process_markdown(&t, slur_regex).await.map(Some),
Some(t) => process_markdown(t, slur_regex).await.map(Some),
None => Ok(None),
}
}

View File

@ -52,7 +52,7 @@ pub fn markdown_rewrite_image_links(mut src: String) -> String {
// Go through the collected links
while let Some((start, end)) = links.pop() {
let url = &src[start..end];
let url = &src.get(start..end).unwrap_or_default();
match Url::parse(url) {
Ok(parsed) => {
// If link points to remote domain, replace with proxied link