嗨,我想知道,但也许我错过了一些关于htmlspecialchars()
,为什么这个函数不能替换所有这些 html 特殊字符
html 特殊字符列表
原因例如%
我可以看到char没有被替换
php手册说:
'&' (ampersand) becomes '&'
'"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
"'" (single quote) becomes ''' only when ENT_QUOTES is set.
'<' (less than) becomes '<'
'>' (greater than) becomes '>'
那么其他字符呢?没有功能可以全部替换?