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

Improves truncate twig filter #12347

Merged
merged 2 commits into from Dec 13, 2017
Merged

Improves truncate twig filter #12347

merged 2 commits into from Dec 13, 2017

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Dec 10, 2017

Currently the truncate twig filter might cut off encoded entities or cut strings to early if encoded entities are within it, this changes should prevent that.

@sgiehl sgiehl added the Needs Review PRs that need a code review label Dec 10, 2017
@mattab
Copy link
Member

mattab commented Dec 10, 2017

as it is security related (could introduce xss), before we could merge this we would need unit tests.

@sgiehl
Copy link
Member Author

sgiehl commented Dec 10, 2017

actually it shouldn't be security related, as it doesn't change the string. But can add some test nevertheless.

@sgiehl
Copy link
Member Author

sgiehl commented Dec 11, 2017

Added some simple tests...

@mattab mattab merged commit 56f7bc5 into 3.x-dev Dec 13, 2017
@mattab mattab added this to the 3.2.2 milestone Dec 13, 2017
@mattab mattab deleted the truncatefilter branch December 13, 2017 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants