V
V
Vlad Timofeev2015-01-16 23:43:25
Node.js
Vlad Timofeev, 2015-01-16 23:43:25

How to disable script execution in jade?

Hello again :)
The template from the database is passed, let's say, the content of the post, edited by the user (in html).
Like this:
!{post.text}
But if there is a script tag, then jade does not ignore it, but skips it. How to catch these lines with the script and disable it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SagePtr, 2015-01-17
@PyTiMa

#{post.text}
But it must not be at the beginning of the line, but must be nested at least in something, otherwise it will be perceived as a tag.
For example, like this:
div.post #{post.text}

V
Vlad Timofeev, 2015-01-17
@PyTiMa

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question