fluffy-critter / Feed-on-Feeds

RSS feed aggregator
GNU General Public License v2.0
20 stars 3 forks source link

Feed items' stylesheets are being imported globally #1

Closed fluffy-critter closed 9 years ago

fluffy-critter commented 9 years ago

Issue: Some feeds inject external <link rel="stylesheet"> tags into individual items' <description>s, breaking the layout of FoF in general on some browsers.

Example feed: http://feeds.feedburner.com/sluggy_freelance

Easy fix: have a plugin strip out all <link> tags from items More advanced fix: have a plugin parse the stylesheet and inject item-specific ids to all selectors (e.g. if the item has an id of i12345 then the generated stylesheet has a #i12345 prepended to every selector)

The more advanced fix won't actually work in this case because the bogus style rule is on the <body> tag, but it's the thought that counts, right?

Of course the more advanced fix can still lead to all sorts of fun security/injection cases with absolute positioning so I'd rather just strip <link> out entirely (since I don't think there's ever a legitimate reason for it to end up in an item), or at least ones with rel="stylesheet" (which is definitely a problem to include).

fluffy-critter commented 9 years ago

Fixed in d426987