jugyo / termtter

moved to https://github.com/termtter/termtter
201 stars 34 forks source link

tinyurl plugin: bit.ly breaks when & symbol is in url #101

Open ghost opened 15 years ago

ghost commented 15 years ago

When I tried to submit this ebay url: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=220509703021&ssPageName=STRK:MEWAX:IT

The returned bit.ly url linked to: http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem

I'm not sure if this is a problem with the tinyurl plugin or the bit.ly api itself.

BanzaiMan commented 14 years ago

Currently, tinyurl plugin uses URI.escape to pass your URL to bit.ly. URI.escape does not escape '?', while CGI.escape does. Changing this appears to fix your particular case, but I am not sure if that is universally acceptable fix.