??[???]
escape[編碼]
test.php:
$smarty = new Smarty;
$smarty->asset('articleTitle', "'? ?? ?? ??? ?? ??? ?? ??'");
$smarty->display('test.html');
test.html:
{$articleTitle}
{$articleTitle|escape}
{$articleTitle|escape:"html"} {* ????? & " ' < > *}
{$articleTitle|escape:"htmlall"} {* ?? HTML ??? ???????? *}
{$articleTitle|escape:"url"}
{$articleTitle|escape:"quotes"}
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
輸?:
' ? ?? ?? ??? ?? ??? ??'
'? ?? ?? ??? ?? ??? ??? ??? ??'
'? ?? ?? ??? ?? ??? ??? ??? ??'
'? ?? ?? ??? ?? ??? ??? ??? ??& #039;
%27???+??+??+to+? ?? ??+??%27
'? ?? ?? ??? ?? ??? ?? ??'
<a href="mailto:%62%6f%62%40%6d% 65%2e%6e%65%74">bob@me.ne x74;</a>