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

unpredicable behviour with truncate_html filter #2432

Closed
olivierdalang opened this issue Apr 5, 2019 · 1 comment
Closed

unpredicable behviour with truncate_html filter #2432

olivierdalang opened this issue Apr 5, 2019 · 1 comment
Labels

Comments

@olivierdalang
Copy link

Hi,

The truncate_html filter is nice but is not predicable .

{{ 'abcdefghijkpqrstuvwxyz'|truncate_html(10) }} renders <p>abcdefghij...</p>
while
{{ 'abcdefghijkpqrstuvwxyz'|truncate_html(100) }} renders abcdefghijkpqrstuvwxyz

This is problematic as it will break html/layout depending on the string.

Cheers,

Olivier

@rhukster rhukster added the bug label Apr 5, 2019
@rhukster
Copy link
Member

rhukster commented Apr 5, 2019

Confirmed

rhukster added a commit that referenced this issue Apr 5, 2019
@rhukster rhukster closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants