Strange issue with IE converting certain url param

2019-07-16 04:19发布

I have a url that contains these parameters:

&lt_ts1=blah&gt_ts1=blah

Internet Explorer takes it upon itself to change it to this (regardless of a lack of semi-colons):

<_ts1=blah>_ts1=blah

The url string is generated in PHP. Is there any way of protecting the url in IE without changing the parameter names (worst case scenario)?

Ta!

1条回答
Emotional °昔
2楼-- · 2019-07-16 05:09

You should always put the ampersand as an entity like so:

&amp;lt_ts1=blah&amp;gt_ts1=blah

I guess that IE treat &lt as a < sign, even if there is no ; at the end. (&lt being the < entity)

查看更多
登录 后发表回答