Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Can Volt autoescape by default

Can Volt Engine autoescape all variables printed? Something like:

$volt->setOption("autoEscape", true);

This question could be a security issue, as it is impossible to not to forget escapement of each statement.



506
Accepted
answer
edited May '14

There is an autoescape mode

http://docs.phalconphp.com/en/latest/reference/volt.html#autoescape-mode

//Manually escaped: 
{{ robot.name|e }}

// Auto escaped:
{% autoescape true %}
{{ robot.name }}
{% endautoescape %}