Add security recommendation to README.md (fixes #353)

This commit is contained in:
Kirill Efimov
2019-11-29 08:38:09 +02:00
parent e95c5a008c
commit e0a45d926b
+3 -2
View File
@@ -16,7 +16,7 @@ A quick example:
```php ```php
<?php <?php
$m = new Mustache_Engine; $m = new Mustache_Engine(array('entity_flags' => ENT_QUOTES));
echo $m->render('Hello {{planet}}', array('planet' => 'World!')); // "Hello World!" echo $m->render('Hello {{planet}}', array('planet' => 'World!')); // "Hello World!"
``` ```
@@ -53,11 +53,12 @@ And render it:
```php ```php
<?php <?php
$m = new Mustache_Engine; $m = new Mustache_Engine(array('entity_flags' => ENT_QUOTES));
$chris = new Chris; $chris = new Chris;
echo $m->render($template, $chris); echo $m->render($template, $chris);
``` ```
*Note:* we recommend using `ENT_QUOTES` as a default of [entity_flags](https://github.com/bobthecow/mustache.php/wiki#entity_flags) to decrease the chance of Cross-site scripting vulnerability.
And That's Not All! And That's Not All!
------------------- -------------------