mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-25 21:49:20 +00:00
Compare commits
No commits in common. "479aebd0233daea2b46fd65c90a6134f133e3c15" and "3ab098db5ce6ca4e9dcc4f5d34c6a3c9ebd1486d" have entirely different histories.
479aebd023
...
3ab098db5c
@ -1,7 +1,6 @@
|
||||
# upcoming
|
||||
|
||||
- (fix) duplicate articles caused by the same feed addition (thanks to @adaszko)
|
||||
- (fix) relative article links (thanks to @adazsko for the report)
|
||||
|
||||
# v2.4 (2023-08-15)
|
||||
|
||||
|
@ -12,7 +12,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/nkanaev/yarr/src/assets"
|
||||
"github.com/nkanaev/yarr/src/content/htmlutil"
|
||||
"github.com/nkanaev/yarr/src/content/readability"
|
||||
"github.com/nkanaev/yarr/src/content/sanitizer"
|
||||
"github.com/nkanaev/yarr/src/content/silo"
|
||||
@ -313,14 +312,6 @@ func (s *Server) handleItem(c *router.Context) {
|
||||
c.Out.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
// runtime fix for relative links
|
||||
if !strings.HasPrefix(item.Link, "http") {
|
||||
if feed := s.db.GetFeed(item.FeedId); feed != nil {
|
||||
item.Link = htmlutil.AbsoluteUrl(item.Link, feed.Link)
|
||||
}
|
||||
}
|
||||
|
||||
item.Content = sanitizer.Sanitize(item.Link, item.Content)
|
||||
|
||||
c.JSON(http.StatusOK, item)
|
||||
|
Loading…
x
Reference in New Issue
Block a user