Slide 25
Slide 25 text
Output escaping
...’);
htmlspecialchars(‘’, ENT_QUOTES, ‘UTF-8’); // UTF-7
filter_var(‘invalid.email.com’, FILTER_VALID_EMAIL); // false
/* Using 3rd party */
use Zend\Escaper\Escaper;
$twig->render(‘...’); // escapes by default, but...
?>
Don’t forget the context...especially if there’s multiple!
25
Wednesday, August 21, 2013