unescape鍙互瑙g爜entity,
html 鍜� htmlall绛夌殑缂栫爜銆�
瀹冧笌escape 淇グ鍣�鐨勬晥鏋滃垰濂界浉鍙嶃��
| 鍙傛暟椤哄簭 | 绫诲瀷 | 蹇呴�夊弬鏁� | 鍏佽鍙栧�� | 榛樿鍊� | 璇存槑 |
|---|---|---|---|---|---|
| 1 | string | No |
html, htmlall,
entity,
|
html |
瑙g爜鐨勭被鍨� |
| 2 | string | No |
ISO-8859-1, UTF-8,
鎴栬�呬换浣�
htmlentities()鍙互鏀寔鐨勫瓧绗﹂泦銆�
|
UTF-8 |
浼犻�掔粰html_entity_decode() 銆� htmlspecialchars_decode() 鎴� mb_convert_encoding()鐨勫瓧绗﹂泦 |
Example聽5.22.聽escape
<?php
$smarty->assign('articleTitle',
"Germans use "Ümlauts" and pay in €uro"
);
?>
unescape渚嬪瓙
{$articleTitle}
Germans use "Ümlauts" and pay in €uro
{$articleTitle|unescape:"html"}
Germans use "Ümlauts" and pay in €uro
{$articleTitle|unescape:"htmlall"}
Germans use "脺mlauts" and pay in 鈧瑄ro
鍙傝 Smarty缂栬瘧杞崲, escape 淇グ鍣�.
