Hi,
I've been able to add facebook, twitter and flickr to the follow module but when I try last.fm it says my url is invalid. I have checked the url so many times but no joy. I think the module doesn't like the .fm in the url.
Please help.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | fix-install-538172-26.patch | 642 bytes | pwolanin |
| #24 | follow-validation-538172-24.patch | 13.42 KB | pwolanin |
| #22 | follow-validation-538172-21.patch | 12.61 KB | pwolanin |
| #13 | follow-validation-538172-13.patch | 6.59 KB | pwolanin |
| #12 | follow-validation-538172-12.patch | 6.31 KB | pwolanin |
Comments
Comment #1
q0rban commentedHi, I'm sorry you are having troubles.
I can't replicate this. Can you paste the url here that you are unable to use? Thanks!
Comment #2
neo2049 commentedThe URL I am trying is http://www.last.fm/music/Musica+Reverso
Thanks for your help.
Comment #3
q0rban commentedhmm, I imagine it's the plus symbol actually. Try http://www.last.fm/music/Musica%2BReverso
Comment #4
neo2049 commentedThanks man! It works perfectly now.
Comment #5
q0rban commentedI'm going to keep this active in case it continues to be a problem for other people.
Comment #6
q0rban commentedBumping down to normal
Comment #7
q0rban commentedComment #8
pwolanin commentedstarted working on this for D7, adding knwn service urls to build better validation
Comment #9
pwolanin commentedhere's a pass at a D7 patch, not really tested yet.
Comment #10
pwolanin commentedpicking up the suggestion here: http://drupal.org/node/619276#comment-2218064 for a more complex data structure to help with validation and display
Comment #11
pwolanin commentedComment #12
pwolanin commentedfixes a bug with the user block theme function call also.
Comment #13
pwolanin commentedremove debug code, improve error message.
Comment #14
pwolanin commentedAllowing special characters is hard, since there is only a single text area. Basically to do it correctly we need to parse the URL on input and store the parts separately in the DB. I think drupal core is doing something like this in the menu module.
I'm planning to commit the above patch, since solving the other concern seems liek a more substantial problem that at first sight.
Comment #15
q0rban commentedMarked #622118: Follow doesn't accept valid Flickr link dues to @ symbol as a duplicate of this issue.
Also, anyone that is having trouble with special characters can refer to this doc and convert the special characters by hand.
@pwolanin, is there any way to parse out the url and pass all fragments to urlencode?
Comment #16
pwolanin commented@q0rban - yes, see: http://api.drupal.org/api/function/menu_edit_item_validate/7
but then I'd suggest the DB storage needs to change. In fact the module should not even need to urlencode anything if using the l() function properly due to http://api.drupal.org/api/function/drupal_http_build_query/7
Comment #17
q0rban commentedOk, then I think the only thing the regex needs to do is make sure it has the domain in the url. Then we still need to somehow filter for XSS before saving to the DB, correct?
Comment #18
pwolanin commented@q0rban - no, l() should filter this on output, so using that well will make everything both easier and more robust. In fact, if we are going to parse the URL, likely we can make the regex simpler.
We will essentially need to save to the DB 2 possible ways:
1) a path + serialized options array as 2 columns
2) a path, query, and fragment columns (query sill likely as a serialized array)
Comment #19
q0rban commentedHmm... I'm going to have to think about this.. Off the bat I'm not crazy about parsing it and saving it to the DB that way.
Comment #20
pwolanin commented@q0rban - well that's how drupal core saves links - what's the downside?
Comment #21
pwolanin commentedWe should apply these 2 functions:
http://www.php.net/manual/en/function.parse-url.php
http://www.php.net/manual/en/function.parse-str.php
Comment #22
pwolanin commentedComment #23
pwolanin commentedcould also look at using http://api.drupal.org/api/function/drupal_parse_url/7, but that's not as readily backported to 6.x
Comment #24
pwolanin commentedMinor tweaks to regex generation and help/error text. About ready to commit this.
Comment #25
pwolanin commentedComment #26
pwolanin commentedopps - broke a clean install. Follow-up patch to fix this - committing.
Comment #28
seanrThis is still not fixed in follow-6.x-1.4. It's not fixed in the dev branch either and it's been a year and a half.
Comment #29
seanrSpecifically, the issue in question is #622118: Follow doesn't accept valid Flickr link dues to @ symbol which was marked as a duplicate of this one. This one was marked as fixed, but it clearly isn't (at least in 6.x).
Comment #30
q0rban commentedIt's still not fixed in 6.x-1.x-dev? Can you give me steps to replicate in 6.x-1.x-dev?
Comment #31
astonvictor commentedI'm closing it because the issue was created a long time ago without any further steps.
if you still need it then raise a new one.
thanks