문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top