为什么url中的\/没办法转义成/?
比如:微信获取code的时候
https:\/\/open.weixin.qq.com\/connect\/qrconnect?appid=wx21128d939f7e9487&redirect_uri=http%3A%2F%2Fauth.xingdongshe.com&response_type=code&scope=snsapi_login&state=5545#wechat_redirect
当我复制到浏览器的时候被转义成:
https://open.weixin.qq.com//connect//qrconnect?appid=wx21128d939f7e9487&redirect_uri=http%3A%2F%2Fauth.xingdongshe.com&response_type=code&scope=snsapi_login&state=5545#wechat_redirect
然而:由于.com//connect//qrconnect 在.com和connect后面是两个//,导致不能访问。当我把//换成/时就能正常访问了。
请问这个是什么原因,不应该按照\/被转义成/吗? TKS
印象当中\转义成,/是unix系统下的文件格式分割符,不用转义吧,在url里也是这样的吧。
话说获取code的时候,我怎么没遇到过这么奇怪的地址,你用urlDecode看看