aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-03-23 06:55:19 +0000
committerFuwn <[email protected]>2024-03-23 06:55:19 +0000
commit4e5bcde7adc6aa9cb509503b82edddb21b67e413 (patch)
treeee5a80af1d2cd8a79b5d7f714ddecd602266e3f9
parentfix(html): html encode text body (diff)
downloadseptember-4e5bcde7adc6aa9cb509503b82edddb21b67e413.tar.xz
september-4e5bcde7adc6aa9cb509503b82edddb21b67e413.zip
fix(html): no default proxy double host
-rw-r--r--src/html.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/html.rs b/src/html.rs
index 00a1af4..83e38ab 100644
--- a/src/html.rs
+++ b/src/html.rs
@@ -73,13 +73,14 @@ pub fn from_gemini(
{
href = format!("/proxy/{}", href.trim_start_matches("gemini://"));
} else {
- href = href.trim_start_matches("gemini://").replace(
+ href = href.trim_start_matches("gemini://").replacen(
&if let Some(host) = url.host() {
host.to_string()
} else {
return None;
},
"",
+ 1,
);
}
}