【发布时间】:2012-12-25 10:14:33
【问题描述】:
如何在 Meteor 模板中显示标记的字符串数据?
我需要从我的数据库中显示一个字符串,该字符串包含一些基本的 HTML 标记,以便正确格式化生成的文本。它目前只显示标记文本。
这是模板的相关部分:
<span class="description">{{description}}</span>
其中 {{description}} 是包含标记的字符串(如“hello
world”)。
我希望它显示
hello
world
而不是
hello<br>world
我猜这类似于在 javascript 中使用 innerHTML。
提前致谢!
【问题讨论】:
标签: html templates meteor markup