![](/img/trans.png)
[英]Is there a way to replace a string with html tags in TWIG (Symfony2)?
[英]symfony twig html tags </div>
我對樹枝還很陌生,所以遇到了一些麻煩。 如何在變量名的末尾添加標簽?
{{ item.description|raw'</div>' }}
是正確的?
說明是帶有html標記的
我認為最好的方法是從樹枝中添加標簽:
{{ item.description|raw }}</div>
但是,您可以使用串聯:
{{ (item.description ~ '</div>')|raw }}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.