0

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&r=http://www.test.com/¿cómo_se_dice"></script>

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?

skaffman
  • 398,947
  • 96
  • 818
  • 769
Matt Ryan
  • 1,717
  • 2
  • 20
  • 30

1 Answers1

1

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.

Community
  • 1
  • 1
Pekka
  • 442,112
  • 142
  • 972
  • 1,088