gpt4 book ai didi

html - 显示带有 html 内容的 smarty 变量

转载 作者:搜寻专家 更新时间:2023-10-31 02:24:46 24 4
gpt4 key购买 nike

我有一个 smarty 变量,其中包含 html 内容,例如: $html="<strong>Content</strong><br/>etc etc".我尝试以 html 格式显示它。展示的时候喜欢 {$html}只有纯文本出现而没有格式化。我尝试像: {$html|unescape}但随后显示但未应用标签。你有什么建议吗?

最佳答案

有趣的是,这里的所有答案都不适用于 CS-Cart 4.3.4 上的 Smarty 3.1.21。因此,在这种情况下再添加一个想法,在 $html 字符串上使用 nofilter,如下所示:

{$html nofilter}

关于html - 显示带有 html 内容的 smarty 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16449583/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com