Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
aggregator.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Dec 2005 at 10:44 UTC
Updated:
1 Jan 2006 at 07:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
frjo commentedI can confirm this bug.
URL:s in aggregator end up like this
when they should look like this. (This is also how they now are saved in the db.)
If I remove the calls to check_url() for $item->link in the functions theme_aggregator_block_item, theme_aggregator_summary_item and theme_aggregator_page_item the links comes out correct.
This make some sense I thinks because the feed items has already been "cleaned" in the aggregator_parse_feed function by filter_xss().
Is this a correct fix?
Comment #2
chx commentedno. The correct way is _not_ to filter_xss $item['link'] but only check_url it. Why? Because the link is not HTML but a value of HREF attribute and therefore the filter_xss is not appropriate here. Someone would care to submit a patch? :)
Comment #3
frjo commentedI have attached a patch that does this
It fix the problem on my site with no ill effects that I can see.
Comment #4
chx commentedfrom a security standpoint of view, I am OK with this change, GUID is only used to replace link and link is check_url'd everywhere.
From an aggregator point of view , i have no idea.
Comment #5
dries commentedCommitted to DRUPAL-4-5 and DRUPAl-4-6. For HEAD, I'd like to move the filtering from 'on input' to 'on output'.
Comment #6
moshe weitzman commentedComment #7
(not verified) commented