SlyMarbo / rss

A Go library for fetching, parsing, and updating RSS feeds.
Other
399 stars 85 forks source link

CDATA tags inside content not parsed #74

Open gonejack opened 3 years ago

gonejack commented 3 years ago
package main

import (
    "github.com/SlyMarbo/rss"
)

func main() {
    feed, err := rss.Fetch("http://www.ruanyifeng.com/blog/atom.xml")
    if err != nil {
        // handle error.
    }

    // ... Some time later ...

    err = feed.Update()
    if err != nil {
        // handle error.
    }
}

image

Related issue on other library: https://github.com/mmcdole/gofeed/issues/98

SlyMarbo commented 3 years ago

Hi. I've taken a quick look. The problem is that item content is currently not parsed (which would remove the CDATA tags), because that would break other common feeds, which are malformed. Unfortunately I don't have much time to work on this, so it will probably be a while before there's a fix. Sorry.