Closed (fixed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-2.x-dev
Component:
Code - Functionality
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2010 at 22:11 UTC
Updated:
15 Feb 2011 at 07:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
icecreamyou commentedSorry for the delay, I was on vacation -- I think it should be
filter_xss(urldecode())but thanks for the patch and I will try to commit this as soon as I can.Comment #2
icecreamyou commentedI don't know what I was thinking with urldecode(). Committed your patch to dev, thanks.
Comment #4
d4rkngel commentedI think that this should be changed to filter_xss($status->status, array()); "currently filter_xss($status->status)" because $allowed_tags is set to array('a', 'em', 'strong', 'cite', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd'); and I think that we shouldn't allow this tags on statuses feed, see attached image.
Comment #5
icecreamyou commentedActually, it should probably be this:
That's consistent with the way it works everywhere else in FBSS. (And it's standard to allow those tags in RSS feeds.)
Maybe it would be better to put the status in the "description" element though -- but then I don't know what would go in the title... maybe filter_xss($status->status, array()) for the title and a "less clean" version in the description.
Comment #6
d4rkngel commentedHow about using $usernames_context_aware as the title and the status as the description (something like twitter), this also solves the issue that when an empty status has an attachment.
Comment #7
d4rkngel commentedSee no more scaped characters:
Comment #8
icecreamyou commentedTwitter doesn't do that. The username of the creator of the tweet is in the title, but so is the tweet.
I believe that the $user->name property works with realname as long as the user object is loaded directly (i.e. using user_load()). The global $user object is incomplete so $GLOBALS['user']->name doesn't work. Regardless, I won't accept filter_rss(theme('username', $account)). It's messy. It may be possible to do something like
module_exists('realname') ? $account->realname : $account->nameif necessary.The literal binary double-right-chevron symbol (») can't be directly inserted into the code. It needs to be either the HTML (
») or the unicode ("\xC2\xBB").This also needs to be in patch format
Comment #9
d4rkngel commentedShould we then let the status text in the title?
Ok, so here's the first tray.
Comment #10
icecreamyou commentedYes, the patch looks good except for that.
Comment #11
d4rkngel commentedOk here's the second one
Comment #12
d4rkngel commentedOops sorry, here's the patch again
Comment #13
icecreamyou commentedThe status text should be part of the translation here. (For example, in a right-to-left language, the translation would have the status on the left; but if we append it after translating, it will always be on the right.)
Additionally, the version of the status that goes in the title should be
filter_xss($status->status, array()), not the version with the input filter run over it.Comment #14
d4rkngel commentedLet's try this
EDIT: I was wondering if we should use check_plain() with usernames...
Comment #15
icecreamyou commentedOh, yes, actually I meant to say that it should be e.g. @poster instead of !poster to make sure they are properly escaped. Other than that the patch looks good
Comment #16
d4rkngel commentedOk, changes applied
Comment #17
icecreamyou commentedCommitted, thanks!