thephpleague / plates

Native PHP template system
https://platesphp.com
MIT License
1.47k stars 180 forks source link

Escape helper works only with UTF8 #106

Closed userlond closed 6 years ago

userlond commented 8 years ago

https://github.com/thephpleague/plates/blob/master/src/Template/Template.php#L268

Current implementation of escape filter works only with UTF8-encoded data. Suggest the way to configure default encoding and use it inside such helpers.

reinink commented 7 years ago

I think it would be good to add a new configuration option for this:

// Create new Plates engine
$templates = new League\Plates\Engine('/path/to/templates');

// Set charset
$templates->setCharset('ISO-8859-1');

We'd still use UTF-8 as the default.

ragboyjr commented 6 years ago

Closing in favor of #171