L
L
Les Alterman2016-08-08 15:12:53
PHP
Les Alterman, 2016-08-08 15:12:53

Why are tags not converted to html when rendering a post in Twig?

Good day! When adding an entry to the database, all content is escaped using htmlspecialcharls(); When the record is output, the information is decoded, but the tags are not converted to html.
Example:
Should output like this:
The most common example
A output like this:
<p>Самый<b>обычный</b> <i>пример<i></p>
raw filter doesn't help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2016-08-08
@Les_Alterman

1) no need to escape XSS when inserting into the database
2) read about twig raw output
// EDIT
www.phptherightway.com/#security

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question