Explorar o código

Prepend "https://" to relative rss links

Zed %!s(int64=7) %!d(string=hai) anos
pai
achega
a3303d6bef
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/formatters.nim

+ 1 - 1
src/formatters.nim

@@ -28,7 +28,7 @@ proc replaceUrl*(url: string; prefs: Prefs; rss=false): string =
   if prefs.replaceTwitter.len > 0:
     result = result.replace(twRegex, prefs.replaceTwitter)
   if rss:
-    result = result.replace("href=\"/", "href=\"" & hostname & "/")
+    result = result.replace("href=\"/", "href=\"https://" & hostname & "/")
 
 proc proxifyVideo*(manifest: string; proxy: bool): string =
   proc cb(m: RegexMatch; s: string): string =