1

this is the text used to trim in the list view

my_var = une  startup (jeune pousse, société )

and use this template tag for trimming

 {{my_var | striptags | truncatechars:"50" }}

I got this output

une  startup (jeune pousse, soci&eacu...

expected out is : une  startup (jeune pousse, socié...

but got some unexpected output....

Shihabudheen K M
  • 1,347
  • 1
  • 13
  • 19
  • This is not a problem with the template. The variable's contents is converted to HTML entities before being passed to the template, somewhere in your code. That said, there's no way to handle this with standard filters (truncatechars_html is *tag* aware but **not** *entity* aware). –  Mar 04 '18 at 14:51

0 Answers0