Escape helper works only with UTF8 #106

Open
userlond opened this Issue Feb 19, 2016 · 1 comment

Projects

None yet

2 participants

@userlond

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
Member
reinink commented Dec 27, 2016

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.

@reinink reinink added this to the 4.0 milestone Dec 27, 2016
@reinink reinink added the enhancement label Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment