Skip to content

Commit

Permalink
ignore banner url startwith hash in link preload
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzy823 committed Feb 14, 2022
1 parent 6695784 commit 67c937a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/general.nim
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ proc renderHead*(prefs: Prefs; cfg: Config; req: Request; titleText=""; desc="";
meta(property="og:site_name", content="Nitter")
meta(property="og:locale", content="en_US")

if banner.len > 0:
if banner.len > 0 and not banner.startsWith('#'):
let bannerUrl = getPicUrl(banner)
link(rel="preload", type="image/png", href=bannerUrl, `as`="image")

Expand Down

0 comments on commit 67c937a

Please sign in to comment.