Opened 15 years ago
Closed 15 years ago
#1289 closed defect (bug) (fixed)
All activity feeds have wrong XML <link> tag data for new friendship announcements
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 1.1.3 | Priority: | minor |
Severity: | Version: | ||
Component: | Keywords: | has-patch activity rss friend friendship link xml url href | |
Cc: | MrMaz |
Description
Here is where the activity feed templates are calling the template tag:
http://trac.buddypress.org/browser/branches/1.1/bp-activity/feeds/bp-activity-friends-feed.php#L35
http://trac.buddypress.org/browser/branches/1.1/bp-activity/feeds/bp-activity-personal-feed.php#L35
http://trac.buddypress.org/browser/branches/1.1/bp-activity/feeds/bp-activity-sitewide-feed.php#L36
The problem is that when the bp_activity_feed_item_link() function returns the "primary_link" field (for a new friendship activity item) in the activity feed templates, an <a> tag is put into the XML <link> tag, which results in bad behavior by feed readers.
http://trac.buddypress.org/browser/branches/1.1/bp-activity/bp-activity-templatetags.php#L442
The problem is with the function friends_accept_friendship() on this line. It calls bp_core_get_userlink() which returns an <a> tag instead of just the URL. The entire tag is then stored in the table's "primary_link" field. I don't think this is correct, unless I missed something.
http://trac.buddypress.org/browser/branches/1.1/bp-friends.php#L632
Suggested fix is to change line 632 to use bp_core_get_userurl() instead which returns only the URL.
Need someone else to test this patch to make sure it doesn't break anything.