替换模板ftl中的内容的时候,一些特殊的字符需要转移,例如:

&,<,> 

 

 

value为字符串

value.replace("&","&amp;").replace(">","&gt;").replace("<","&lt;")

 

相关文章:

  • 2022-12-23
  • 2021-10-31
  • 2021-05-29
  • 2022-12-23
  • 2021-06-21
  • 2021-11-04
  • 2021-11-11
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2021-09-10
  • 2021-05-20
  • 2021-06-29
  • 2021-12-02
  • 2021-06-23
相关资源
相似解决方案