Answer the question
In order to leave comments, you need to log in
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
#{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}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question