&times转义成×

写了个单点登录的接口,要传时间戳

本应该是:

https://***:/data/single/sso?mobile=***&url=***&sign=***&times=***

却变成了:

https://***:/data/single/sso?mobile=***&url=***&sign=***×=***

https://***:/data/single/sso?mobile=***&url=***&sign=***×=***

原因:在URL中参数若有&times则会被转成x

解决办法:

1、把&times不放在后面,放在首位

https://***:/data/single/sso?times=***&url=***&sign=***&=mobile***

2、把&符号转义成html实体,&的实体是%amp;

https://***:/data/single/sso?mobile=***&url=***&sign=***&times=***