IE将某些url参数转换成html实体的奇怪问题 [英] Strange issue with IE converting certain url params into html entities

查看:129
本文介绍了IE将某些url参数转换成html实体的奇怪问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含这些参数的网址:

 & lt_ts1 = blah& gt_ts1 = blah 

Internet Explorer自行将其更改为此(不考虑分号为无):

 < _ts1 = blah> _ts1 = blah 



'p>在URL字符串在PHP生成。有没有任何方法来保护IE中的URL,而不用更改参数名称(最坏的情况)?



Ta!

解决方案

您应该始终把&符号作为一个实体:

 & ; amp; lt_ts1 = blah& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp;一个<签收,即使没有;最后。 (& lt< entity)


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!

解决方案

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)

这篇关于IE将某些url参数转换成html实体的奇怪问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆