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 c9d4814 commit 8f4b8ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@ func main() {

// remove <?xml version="1.0" encoding="UTF-8"?>
data = strings.Replace(data, `<?xml version="1.0" encoding="UTF-8"?>`, "", 1)
// below hacks for code inside summary..
// replace &&
data = strings.Replace(data, "&amp;&amp;", "&amp;amp;&amp;amp;", -1)
// replace <<
data = strings.Replace(data, "&lt;&lt;", "&amp;lt;&amp;lt;", -1)
// replace less than ( not open bracket )
data = strings.Replace(data, " &lt; ", " &amp;lt; ", -1)


f, err := os.OpenFile("rss.xml", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
Expand Down

0 comments on commit 8f4b8ba

Please sign in to comment.