2

正如医生所说,我可以通过下一个代码应用 H 过滤器<% $message_body | h %>

但是当我在 <%perl> 标签内时调用过滤器没有被覆盖。

是的,医生说我可以打电话$m->filter(...,但这会产生下一个错误:

Error during compilation of /.../input: 
Bareword found where operator expected at /.../input line 42, near "$.H" (Missing operator before H?)

我的 perl 代码是:

$m->filter( $.H, "$value" );

我的工作是:

</%perl>
<% $value | h%>
<%perl>

但这很丑陋。请纠正我,我做错了什么$m->filter( $.H, "$value" );

4

1 回答 1

0

我想你正在寻找这个:

print $m->apply_escapes($value, 'h');
于 2015-05-17T19:12:43.950 回答