Open RafaelKr opened 4 years ago
I ran into this issue a few days ago. I noticed it in the email being sent out.
For the text version of the email I solved it by piping the variable through decode
.
The HTML version of the email worked fine obviously, without decoding.
But it seems this is a bug if it shows htmlentities in the control panel page as well.
I just found this related issue: https://github.com/statamic/v2-hub/issues/2386
You're definitely on the right spot of the code that's the issue here. Whether the suggested fix is the right one though is a different matter. Changing htmlentities
to htmlspecialchars
may cause a number of unintended consequences elsewhere sanitize()
has been used. We'll need to look into it. I can't promise a date, but I can promise we'll see if we can resolve it.
Describe the bug When submitting a form, the input is sanitized by using the PHP function
htmlentities
. Unfortunately this also replaces german umlauts with htmlentities. So I get incorrect data.Example:
To Reproduce Steps to reproduce the behavior:
Expected behavior Umlauts should be kept.
Environment details (please complete the following information):
Fix of the problem
statamic/bootstrap/helpers.php
htmlentities
withhtmlspecialchars
on lines 699 and 719 (for Statamic 2.8.15).