Sometimes the content and the description are both filled, but with
garbage data. Take the one that is longest because it "feels" like a
better content
latest = when
}
var what string
latest = when
}
var what string
- if len(item.Content) == 0 {
- what = item.Description
- } else {
+ if len(item.Content) > len(item.Description) {
+ } else {
+ what = item.Description
}
what = strings.TrimPrefix(what, "<![CDATA[")
what = strings.TrimSuffix(what, "]]>")
}
what = strings.TrimPrefix(what, "<![CDATA[")
what = strings.TrimSuffix(what, "]]>")