今天测试escape 转换编码没有成功,求助,
tpl里面的内容
{$articleTitle|escape:"html"}<br>
{$articleTitle|escape:"quotes"}<br>
php页面的内容
$smarty->assign('articleTitle', "'Police begin campaign to rundown jaywalkers.Police begin campaign to< rundown> jaywalkers'");
输出的确是:
'Police begin campaign to rundown jaywalkers.Police begin campaign to< rundown> jaywalkers'
'Police begin campaign to rundown jaywalkers.Police begin campaign to< rundown> jaywalkers'
\'Police begin campaign to rundown jaywalkers.Police begin campaign to< rundown> jaywalkers\'
'Police begin campaign to rundown jaywalkers.Police begin campaign to< rundown> jaywalkers'
\'Police begin campaign to rundown jaywalkers.Police begin campaign to< rundown> jaywalkers\'
没有转换,不知道什么原因,求助
转载于:https://blog.51cto.com/xujunyan/287169