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

Fix escapejs return type #117

Merged
merged 1 commit into from Jan 15, 2014
Merged

Fix escapejs return type #117

merged 1 commit into from Jan 15, 2014

Conversation

tomekowal
Copy link

This commit changes escapejs filter to return binary, when it received binary as input.

Couple of weeks ago I proposed to use unicode:characters_to_list in escapejs to fix a bug
with handling 'line separator' and 'paragraph separator'.

Even, when it got binary as input, escapejs returned list as output,
so I left it that way, but I believe, it should return binary, when it receives binary.
For example first filter works this way.

@kaos
Copy link
Member

kaos commented Jan 15, 2014

You are right. I think there's been a policy of binary in should yield binary out.

I would like the actual escape routine to be implemented using binaries, though, to avoid the doubly converts when using binaries (as I prefer binaries over lists), or if needs must, to have a dual implementation. But that is not the issue here.

kaos added a commit that referenced this pull request Jan 15, 2014
@kaos kaos merged commit e201eb3 into erlydtl:master Jan 15, 2014
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.

None yet

2 participants