Custom fields and accentuated characters

Hi :slight_smile:

I have set a custom field as text field and on the documentation, it’s explained :

… For example, a text field type automatically HTML-encodes the user-provided value…

I’m understanding that html-encoding is here for security reason.
However, it’s also escaping the accentuated characters and, in french, it could be hard to read on the final rendering (email template in my case).
Is it possible to escape these kinds of “regular” characters ?

The placeholder could be unescaped with {{ placeholder|raw }} in twig templates and with [[+placeholder: html_entity_decode]] in modx templates. You need a modx output modifier for the second case. <?php return(html_entity_decode($input));

What @jako said is correct, but would bypass the encoding which may have a security impact.

I’m wondering though if what you’re saying @Spheerys, is that it is getting double encoded? Once by the save process and once by the rendering? In that case the encoding in the save would probably be unnecessary…

I had to use the twig raw filter on the product name in a matrix configuration, because an ampersand was double encoded in the output without (cart display and invoice mail/pdf). Since the product name is generated by the website owner, the security issue is less important.

Thanks Jako for the |raw escaped function.
In security term, my custom field is just before the payment step… so I guess is far enough the hacker’s yes… but maybe I’m wrong and it should be good to escape an exhaustive list of accentuated characters in this case…