Needs review
Project:
Managing News
Version:
6.x-1.1
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Oct 2010 at 15:36 UTC
Updated:
29 Nov 2010 at 15:05 UTC
When sharing some items from mn using twitter, special characters are rendered wrongly (with their html code) for example
http://twitter.com/?status=I+unknowingly+registered+two+times+and+during+the+voter+display%2C+my+name+didn%26%23039%3Bt+return.+I+don%26%23039%3Bt+know+whether+I+will+get+my+voter%26%23039%3Bs+card+or+allowed+to+register.+Please+help+me.+I+am+Ssebuma+Emmanuel+%28http%3A%2F%2Fexampledotcom%2Fmanagingnews-1.1%2Fnewsitem%2F1772%29
Comments
Comment #1
Will White commentedThanks for the report. This was fixed by the following commits:
http://github.com/developmentseed/simpleshare/commit/df56d6331efdfadd306...
http://drupal.org/cvs?commit=443188
Comment #2
batje commentedHi Will,
Wow, that is quick. Here is an example
http://twitter.com/?status=I%20unknowingly%20registered%20two%20times%20and%20during%20the%20voter%20display,%20my%20name%20didn't%20return.%20I%20don't%20know%20whether%20I%20will%20get%20my%20voter's%20card%20or%20allowed%20to%20register.%20Please%20help%20me.%20I%20am%20Ssebuma%20Emmanuel%20If i create a link here, the problem does not occur. Only from our managingnews installation (or when i copy th link through skype)
2 things can happen:
In the old twitter interface, the page is redirected and all characters before (and including) the first # are chopped of and you get a "Page not found"
In the new twitter interface, you just get a "page not found"
Getting there.
Comment #3
Will White commentedHi batje,
Again, this should be fixed. Did you try the patched I mentioned in #1?
Comment #4
batje commentedyes i did (eh, i wouldnt have reopened the issue if i didnt) and the behaviour is slightly different than yesterday. I made the change to the strongarm.inc file, updated the simpleshare with drush. And the described behaviour is what i get.
If you login to skype, you will get the URL that is causing the trouble in the same way i see it.
Comment #5
Will White commentedSorry, it wasn't clear that this was a separate issue. I'm not clear on what's wrong. Can you post the link the that Managing News now produces?
Comment #6
batje commentedHi Will,
its in #2. As you can see from there, the spaces are now %20 instead of + This works (for spaces), but the problem now moves to the '
Clicking the link in #2 is not showing what happens because d.o. mangles the link again. If you add me to skype (reinierbattenberg) the link as its generated here should reach you un-url-deandencoded and you should be able to reproduce the problem.
Comment #7
batje commentedComment #8
flatline2010 commentedI am not sure if this is connected to this bug, but, whenever I try to twit a news that has a percent sign in the title, the twitter page does not load. The problem seems to be that even if the % sign is escaped to %25 (I tried this within the shortening url function) it is transformed back to a simple % causing the problem when generating the page. If I change it again in the browser url window to %25, it works.
I use bit.ly as shortener and the shorted url is correctly generated.
Comment #9
batje commentedI found an even easier way to reproduce this:
- install managingnews 1.2
- add this feed: http://www.observer.ug/index.php?format=feed&type=rss (that is pretty standard Joomla, i would say)
- hover over the title of the article: nice ampersands.
- hover over the simpleshare link: the ampersands are urlencoded and look like amersand+amp;
- click twitter
- follow the tinyurl that has been created (copy it from the twitter textbox on twitter.com)
- it fails
Comment #10
batje commentedI solved #9 (and might have solved the others too, it seems) by adding a fourth line to the $url manipulation in simpleshare_handler_field_link.advanced_render that reads:
$url = htmlspecialchars_decode($url);Happy Tweeting!
Comment #11
batje commentedComment #12
flatline2010 commentedIt does not solve #8:
a news with title
Detrazione 55%, cosa cambia con la rateazione in 10 anni
results in
http://twitter.com/?status=Detrazione%2055%,%20cosa%20cambia%20con%20la%...
that does not load (but it would with 55%, => 55%25,)