Closed (fixed)
Project:
Ridiculously Responsive Social Sharing Buttons
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2018 at 07:32 UTC
Updated:
19 Aug 2020 at 13:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jbfelix commentedComment #2
jbfelix commentedComment #3
adamps commentedThanks for the bug report. It looks like a bug of double encoding. First
'is converted to'and then encoded again it becomes'Do you see the same problem with other social sites or is it only linked in?
I will look at it when I get a chance, or if you can provide a patch it will get fixed faster.
Comment #4
adamps commentedComment #5
spaghettibolognese commentedWe're seeing this too on a drupal 7 site. This is caused by token_replace which sanitizes the token replacements and _rrssb_urlencode(). I changed token_replace so it wont sanitize the vars but maybe even its better to remove _rrssb_urlencode() completely.
Comment #6
spaghettibolognese commentedComment #7
adamps commented@SpaghettiBolognese thanks for the analysis and patch.
It's not clear that we can justify sanitize=FALSE, when all we do is urlencode:
I think you may be right, it's not clear why _rrssb_urlencode is needed, but I feel I must have had some reason in my mind at the time! I guess it would be interesting to try taking that out then testing that titles and URLs are correctly encoded. Maybe it could turn out that what is needed is to urlencode the URL but not the title - in which case it should be possible to handle in rrssb_tokens.
If you are willing to test a bit further that would be greatly appreciated.
Comment #9
adamps commented_rrssb_urlencode is definitely needed because we are putting the values in a URL and must replace :/ etc.
I have committed a fix for D8. The sanitise option is no longer available so it required a bit of a hack!
If anyone can test the dev version and confirm it's fixed that would be useful.
Comment #10
adamps commentedI think the patch from #5 is probably the right solution for D7. We ensure the output is safe when we run rawurlencode. However I need to do a little testing before I commit, and no more time right now unfortunately.
Comment #12
adamps commentedOops commit from #8 broke the phone button text.
Comment #13
adamps commentedComment #14
adamps commentedSorry no time to backport to D7