[Freemarker] escape html时要注意空值问题

<#escape x as x?html>

  还不够,因为它不能对付x为空的问题。更保险的写法是

   

<#escape x as (x!)?html>

  

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.