mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Do not fallback to InnerXML if XHTML title is empty
This commit is contained in:
parent
1e357d3ced
commit
c9e0f0b3e4
2 changed files with 31 additions and 29 deletions
|
@ -227,6 +227,9 @@ type atom10Text struct {
|
|||
XHTMLRootElement atomXHTMLRootElement `xml:"http://www.w3.org/1999/xhtml div"`
|
||||
}
|
||||
|
||||
// Text: https://datatracker.ietf.org/doc/html/rfc4287#section-3.1.1.1
|
||||
// HTML: https://datatracker.ietf.org/doc/html/rfc4287#section-3.1.1.2
|
||||
// XHTML: https://datatracker.ietf.org/doc/html/rfc4287#section-3.1.1.3
|
||||
func (a *atom10Text) String() string {
|
||||
var content string
|
||||
switch {
|
||||
|
@ -237,11 +240,7 @@ func (a *atom10Text) String() string {
|
|||
content = a.InnerXML
|
||||
}
|
||||
case a.Type == "xhtml":
|
||||
if a.XHTMLRootElement.InnerXML != "" {
|
||||
content = a.XHTMLRootElement.InnerXML
|
||||
} else {
|
||||
content = a.InnerXML
|
||||
}
|
||||
content = a.XHTMLRootElement.InnerXML
|
||||
default:
|
||||
content = a.CharData
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue