mor*_*ous 0 html symfony1 special-characters
我在Ubuntu上使用Symfony 1.3.2.我写了一个小帮手函数(statsfoo),打印出有关项目的摘要统计信息.
我在我的模板中使用辅助函数,如下所示:
// In StatsHelper.php
<?php
function statsfoo($some_param)
{
return "<div class=\"sfoo\">&9830; the stats number for item is 42</div>"
}
//In showStatsSuccess.php
<?php use_helper(Stats);
<?php echo statsfoo($foobar, ESC_ENTITIES);
Run Code Online (Sandbox Code Playgroud)
我尝试了ESC_ENTITIES和ESC_RAW.在这两种情况下,原始编号(&9830)都显示在页面中.我想要显示钻石.
我做错了什么,我该如何解决这个问题?
"♦"
//^ remember the '#'.
Run Code Online (Sandbox Code Playgroud)
数字字符引用的形式为{或઼,与Character实体引用不同&abc;.
(顺便说一下,你忘了?>.)