百分比符号(%)是否总是HTML转义? [英] Should the percent symbol (%) always be HTML-escaped?
本文介绍了百分比符号(%)是否总是HTML转义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道百分号符号在被传递时必须进行URL编码,但是当我在浏览器中显示时,它也有必要如下所示:%
?
I know the percent symbol has to be URL-encoded when being passed around, but when I display it in the browser, is it also necessary to escape it like so: %
?
推荐答案
在URL中,百分号(%
)具有特殊含义,因此应该被转义。在HTML中,它不是,所以没有必要逃避它。
In URLs, the percent sign (%
) has a special meaning, so it should be escaped. In HTML, it does not, so it is not necessary to escape it.
这篇关于百分比符号(%)是否总是HTML转义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文