Automatically apply entitiesto output using blade
By using 3 braces instead of 2, you can now automatically apply HTML::entities() to any output
This commit is contained in:
@@ -197,6 +197,8 @@ class Blade {
|
||||
*/
|
||||
protected static function compile_echos($value)
|
||||
{
|
||||
$value = preg_replace('/\{\{\{(.+?)\}\}\}/', '<?php echo HTML::entities($1); ?>', $value);
|
||||
|
||||
return preg_replace('/\{\{(.+?)\}\}/', '<?php echo $1; ?>', $value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user