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 淇グ鍣.