1、首先在webx3的webx-component-and-root.xml文件中进行配置,一般默认是已经配置好的,查看要是没有的话,再进行配置,如下:
<!-- Template渲染服务。 -->
<services:template xmlns='http://www.alibaba.com/schema/services/template/engines'
searchExtensions='true'>
<velocity-engine templateEncoding='GBK' strictReference='false'
path='/${component}/templates'>
<global-macros>
<name>global/*.vm</name>
</global-macros>
<plugins>
<vm-plugins:escape-support defaultEscape='html'>
<vm-plugins:noescape>
<vm-plugins:if-matches pattern='^control\.' />
<vm-plugins:if-matches pattern='^screen_placeholder' />
<vm-plugins:if-matches pattern='^stringEscapeUtil\.escape' />
<vm-plugins:if-matches pattern='^csrfToken\.(get)?hiddenField' />
</vm-plugins:noescape>
</vm-plugins:escape-support>
</plugins>
</velocity-engine>
<freemarker-engine templateEncoding='GBK' path='/${component}/templates' />
<jsp-engine path='/${component}/templates' />
</services:template>
2、然后在vm页面里面可以像这样使用:
#noescape() $!data #end