Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
fix rss guid to be url, print formatless text for feed
Browse files Browse the repository at this point in the history
  • Loading branch information
railsagainstignorance committed Feb 27, 2017
1 parent 83935bd commit 1148e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions firstft/firstft.go
Expand Up @@ -49,7 +49,7 @@ func getFirstFTArticles(maxArticles int) *[]*content.Article {
// - attributions, e.g. (FT, Miami Herald)</p> --> (by the FT and Miami Herald)
// - item title: span class=&#34;ft-bold&#34;&gt;Indian phone fraud?&lt;/span&gt; --> append ":"



// scan the firstFT article for FT article links, get the uuid
// - e.g. &lt;a href=&#34;https://www.ft.com/content/1f9974ea-f9e7-11e6-9516-2d969e0d3b65&#34;&gt;German business leader&lt;/a&gt;s -> 1f9974ea-f9e7-11e6-9516-2d969e0d3b65
Expand Down Expand Up @@ -115,7 +115,7 @@ func articlesToRss(articles *[]*content.Article) *string {
Link: &Link{Href: article.SiteUrl},
Description: article.Body,
Created: created,
Id: article.Uuid,
Id: article.SiteUrl,
})

}
Expand Down
2 changes: 1 addition & 1 deletion web-server.go
Expand Up @@ -179,7 +179,7 @@ func firstftRssHandler(w http.ResponseWriter, r *http.Request) {

rssText := firstft.GenerateRss( maxArticles )
w.Header().Set("Content-Type", "application/rss+xml")
fmt.Fprintf(w, *rssText)
fmt.Fprint(w, *rssText)
}

func log(fn http.HandlerFunc) http.HandlerFunc {
Expand Down

0 comments on commit 1148e95

Please sign in to comment.