assetgraph/assetgraph — pull request #186 by bramstein (2014-04-28 18:38:24+00:00)
Title: Extend the RSS asset to support HTML in the description field

This is a work in progress. In an RSS channel each item can contain a `description` field. This field may contain escaped HTML or a CDATA section containing HTML. The RSS feed I'm working is partly automatically generated from the content of a website. This means the embedded HTML contains references to local files and images. I'd like AssetGraph to add these relationships to the graph and maintain them through the optimisation process so that URLs are pointing to the correct locations.

One oddity is that all URLs in RSS feeds must be absolute. I was thinking about using the channel's `link` element, which is mandatory and must point to the site that serves the RSS feed. Perhaps this is a job for an external processor though.

My current implementation searches all RSS elements for a `` and creates a new `HtmlInlineFragment` relation. This relation replaces the content of a element with a parsed HTML fragment, which in turn can have its own relations. My problem is that while AssetGraph seems to parse and find the relations (according to the graph), it fails to load them, and write them to disc when asked to. I'm not sure if this is a bug in my code or a misunderstanding of how AssetGraph works. Any help would be much appreciated.