``'&infin;'`` will be escaped here as a ternary operator is safe only if both branches are safe. You have 2 solutions here:

- use a ``{% if %}`` instead of a ternary operator
- apply the escaping explicitly on the else part so that both branches are safe (constant strings are considered as being safe when applying the auto-escaping)