Skip to content

Commit 4b14084

Browse files
authored
fix: Feed URL duplicating http:// (#257)
fix #256
1 parent cb96c92 commit 4b14084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/feed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn generate_rss(
1616
) -> Result<(), String> {
1717
let date_format = "%a, %d %b %Y %H:%M:%S GMT"; // Loose RFC-822 format
1818

19-
let feed_url = if !config.url.contains("http://") || !config.url.contains("https://") {
19+
let feed_url = if !config.url.starts_with("http://") && !config.url.starts_with("https://") {
2020
format!("http://{}", &config.url)
2121
} else {
2222
config.url.to_string()

0 commit comments

Comments
 (0)