对url使用stumbleupon徽章代码,例如
http://www.test.com/¿cómo_se_dice使用下面的代码片段
<script src="http://www.stumbleupon.com/hostedbadge.php?s=2&r=http://www.test.com/¿cómo_se_dice"></script>它会将url识别为http://www.test.com/cmo_se_dice并删除西班牙语字符。
在将url添加到代码片段之前,有没有特殊的方法来处理它?
发布于 2010-10-05 03:58:05
Stumbleupon实际上做得很对。
这
http://www.test.com/¿cómo_se_dice您需要在将URL传递给徽章之前对其执行percent-encode操作,或者删除特殊字符。
百分比编码将导致以下结果:
http://www.test.com/%C2%BFc%C3%B3mo_se_dice
有一个在线转换器可以用来处理here。
https://stackoverflow.com/questions/3858638
复制相似问题