Skip to content

Commit c67627c

Browse files
committed
minor #8121 Use a safer code sample for Twig best practices (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Use a safer code sample for Twig best practices This fixes #7087. Commits ------- 65bfd46 Use a safer code sample for Twig best practices
2 parents c4c2179 + 65bfd46 commit c67627c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

best_practices/templates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ service in the constructor of the Twig extension:
129129
new \Twig_SimpleFilter(
130130
'md2html',
131131
array($this, 'markdownToHtml'),
132-
array('is_safe' => array('html'))
132+
array('is_safe' => array('html'), 'pre_escape' => 'html')
133133
),
134134
);
135135
}

0 commit comments

Comments
 (0)