Closed trentwiles closed 4 years ago
What you see is #{content}
which is a dynamic tag:
- content = 'div'
#{content} Foo
(same in Phug or Pug.js)
renders:
<div>Foo</div>
To insert a variable as raw html content, you simply need:
!=content
Or first a text node:
| !{content}
Note than you shouldn't use htmlspecialchars
if you already escape in the template: | #{content}
is escaped, | !{content}
is displayed raw, =content
is escaped, !=content
is raw.
Thank you!
Content is output twice with:
From: https://stackoverflow.com/questions/64861822/phug-php-variable-is-printing-twice