html – 为什么Twitter和Google API文档在URL中编码&符号?

have read我应该把&& amp; amp;在HTML中.
然而,来自受尊敬的公司的许多代码示例不知何故忘记这样做.

只是我头顶的几个例子:

Google Web Fonts样品代码

<link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin,cyrillic' rel='stylesheet' type='text/css'>

Google Maps文件

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=ja">

Twitter Anywhere官方教程:

<script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&v=1" type="text/javascript"></script>

有没有真正的好处,没有逃避和符号的链接
这与浏览器怪癖有关吗?这只是文档中的错误吗?

Dear answerers,please make sure you’re answering the right question.

I kNow I should escape ampersands per spec. I also kNow why the mechanism was invented in the first place. I’m not 07004. My question is:

Is there a reason API documentation by respectable companies often violates this rule?

解决方法

Is there any real benefit from not escaping ampersand in links?

它节省了一些按键.

Is this related to browser quirks?

没有

Is this just a mistake in documentation?

Is there a reason API documentation by respectable companies often violates this rule?

无知和/或懒惰.浏览器执行错误恢复,以免他们注意到错误或者他们不在乎.文档可能不是由他们的最佳专家撰写.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些