fix: unescape HTML entities in SearXNG article titles and descriptions
This commit is contained in:
parent
24a69f8cbb
commit
ecf3fd0271
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -291,9 +292,9 @@ func (s *OfficialAccountsService) FetchSearXNGNews(ctx context.Context, site str
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
item := RSSItem{
|
item := RSSItem{
|
||||||
Title: r.Title,
|
Title: html.UnescapeString(r.Title),
|
||||||
Link: r.URL,
|
Link: r.URL,
|
||||||
Description: r.Content,
|
Description: html.UnescapeString(r.Content),
|
||||||
GUID: r.URL, // use the actual URL as GUID for dedup
|
GUID: r.URL, // use the actual URL as GUID for dedup
|
||||||
}
|
}
|
||||||
if r.PublishedDate != "" {
|
if r.PublishedDate != "" {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue