Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Template Operators utf8 friendly #57

Merged
merged 1 commit into from
May 26, 2017

Conversation

pkamps
Copy link
Member

@pkamps pkamps commented May 10, 2017

I run into this problem in context of the CSM project. Try this in your template

{'fipsï'|remove( 4,1 )}

It will break the string because the PHP function substr cannot handle utf8 string (see the funny i at the end of fipsï).

I found that hidden gem from Graham: ezsystems#1162

So I basically did the same thing but did not use the dynamic $funcName idea. The mbstring PHP extension is listed as a requirement for ezp and I think that's good because you want to be able to handle utf8 strings on your website.

@peterkeung
Copy link
Member

+1 to the idea, but it should be run through the enterprise support channel to get eZ QA

@benkmugo
Copy link
Member

+1 on the patch as well as Peter's suggestion. I wonder why they never merged Graham's PR back then, the thing is 2 years old now.

@pkamps
Copy link
Member Author

pkamps commented May 11, 2017

@glye
Copy link

glye commented May 15, 2017

@pkamps This looks good. Would you like to open a PR against our repo, or should we?

@pkamps
Copy link
Member Author

pkamps commented May 15, 2017

@glye please see related pull request in upstream

@glye
Copy link

glye commented May 15, 2017

Thanks!

@peterkeung
Copy link
Member

Merged by eZ, so merging here

@peterkeung peterkeung merged commit 5048fbb into master May 26, 2017
@pkamps pkamps deleted the template_operator_utf8_friendly2 branch April 3, 2020 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants