在使用dede建站网站时候,需要用到过滤html代码,调出纯文本的代码,比如对title、descrption字段用function='Html2Text(@me)来屏蔽过滤html代码的。

 function='Html2Text(@me)是用来屏蔽过滤html代码的。 使用方法,比如对title、descrption字段:
[field:title function='Html2Text(@me)'/] (首页、列表等非文档内页内容区域)
 {dede:field name='description' function='html2text(@me)'/}(文档内容页)....

[field:title function='Html2Text(@me)'/]  (首页、列表等非文档内页内容区域)
{dede:field name='description' function='html2text(@me)'/}(文档内容页)
 
实例:
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />

相关文章:

  • 2021-12-26
  • 2022-02-07
  • 2022-01-28
  • 2022-02-20
  • 2021-09-09
  • 2022-12-23
  • 2021-10-09
猜你喜欢
  • 2021-06-28
  • 2021-11-25
  • 2022-01-19
  • 2021-11-12
  • 2021-11-10
  • 2022-12-23
  • 2021-09-20
相关资源
相似解决方案