8000 Fix filters with empty string input by tbence94 · Pull Request #690 · twigjs/twig.js · GitHub
[go: up one dir, main page]

Skip to content

Fix filters with empty string input #690

New issue
Merged
merged 3 commits into from
Dec 16, 2019
Merged

Fix filters with empty string input #690

merged 3 commits into from
Dec 16, 2019

Conversation

tbence94
Copy link
Contributor
@tbence94 tbence94 commented Dec 11, 2019

See the new tests. Filters should handle empty string inputs.

The escape and nl2br filters failed to do that. Current behavior:

""|escape   --> [object Object]
""|nl2br    --> throws error

I also added some tests for other filters, based on this commit:
2021d34

@tgabi333
Copy link
Contributor

👍 it would be super if we could have this and my fix in a new release @RobLoach please.

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
0