Julienh/Sharrre — Issue #12: Digg button problem
Author: gljivar
Created: 2012-01-24 08:14:26+00:00
State: open

Hi,
there is a general problem with a Digg button. When you digg a link with multiple spaces in it, such as http://www.demotiviraj.se/s/777/Kupio+sam+si+krevet , it won't be shared correctly. Digg will report that this link is a bad link.

We thought that it was just a missing url encoding in sharrre but the problem remained after you released v. 1.2. where I believe url encoding is put. So there is not actually a problem in your script, however we wanted to explain the general problem that occurred that bothered us so perhaps if someone else reports something similar you know the answer.

The problem is that Digg process does url encoding 2 times, but their script which is located on http://widgets.digg.com/buttons.js uses replace function in non standard way like this: replace("+","%2b","g"). This works only in Firefox, and non other browser. It should be used like this by standard: replace(/\+/g,"%2b") . It has more non-standard uses of replace function in the script.

We have reported it to Digg, but only on twitter. Meanwhile, we are using our own modified version.