Skip to content

Commit

Permalink
Fix link to breaking news
Browse files Browse the repository at this point in the history
We do it like this because I suspect that there will be a link without a forward slash at the beginning in the future...
  • Loading branch information
Brawl345 committed May 2, 2023
1 parent b25678b commit 9e7f1f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handler/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (h Handler) check() error {

url := breakingNews.Url
if !strings.HasPrefix(url, "http") {
url = "https://www.tagesschau.de/" + url
url = "https://www.tagesschau.de/" + strings.TrimPrefix(url, "/")
}

textLink := fmt.Sprintf("<a href=\"%s\">Eilmeldung aufrufen</a>", url)
Expand Down

0 comments on commit 9e7f1f7

Please sign in to comment.