tags:

views:

15

answers:

1

hey all,

using the stumbleupon badge code for a url like

http://www.test.com/¿cómo_se_dice

with the following snippet

<script src="http://www.stumbleupon.com/hostedbadge.php?s=2&amp;r=http://www.test.com/¿cómo_se_dice"&gt;&lt;/script&gt;

it will recognize the url as http://www.test.com/cmo_se_dice and remove the spanish characters.

is there a special way to treat the url before adding it to the snippet?

+1  A: 

Stumbleupon are actually doing it right.

This

http://www.test.com/¿cómo_se_dice

is not a valid URL.

You would need to either percent-encode the URL before passing it through to the badge, or remove the special character.

Percent-encoding would result in this:

http://www.test.com/%C2%BFc%C3%B3mo_se_dice

There's an online converter to play around with here.

Pekka