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 b3a2f43 commit b86c982
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ 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, "&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)
// replace simple &
data = strings.Replace(data, " &amp; ", " &amp;amp; ", -1)
//data = strings.Replace(data, " &amp; ", " &amp;amp; ", -1)


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

0 comments on commit b86c982

Please sign in to comment.