Skip to content

Commit

Permalink
Update main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sbouchet authored Oct 13, 2023
1 parent 086a4ba commit 5294287
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"context"
"html"
//"html"
"log"
"os"
"sort"
Expand Down Expand Up @@ -93,14 +93,15 @@ func main() {
// replace #<
data = strings.Replace(data, "#&lt;", "#&amp;lt;", -1)
// replace <-
data = strings.Replace(data, "<-", "&lt;-", -1)
//data = strings.Replace(data, "<-", "&lt;-", -1)


f, err := os.OpenFile("rss.xml", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
if err != nil {
log.Fatal(err)
}
if _, err := f.Write([]byte(html.UnescapeString(data))); err != nil {
if _, err := f.Write([]byte(data)); err != nil {
//if _, err := f.Write([]byte(html.UnescapeString(data))); err != nil {
log.Fatalf("failed to write rss file: %s", err)
}
if err := f.Close(); err != nil {
Expand Down

0 comments on commit 5294287

Please sign in to comment.