Just a quick, hopefully quickly solvable question.
My (Uniform) forms are returning tick marks (', a stand-in for apostrophes on most computers) as their ascii representation: '
So Let's becomes Let's, which doesn’t look great.
Is there a quick fix for such behaviour?
(I deleted the following post, which was written after noticing that the forum code ‘fixes’ such things, and used preformmatting to try to make things clear.)
Not sure what exactly you mean? Returns tick marks where? Also pretty sure you are escaping the field values in your controller, which results in those entities.
If the respondent on the form enters an apostrophe in the form of a vertical tick mark (or types an ampersand… or, I suspect, other characters) the form returns HTML entities for these characters in the email sent to the site owner.
Is there a way I can get them to appear as normal unicode-style characters instead? I see there’s an Html::decode tool, but I don’t know how I’d use that.
I added ‘escapeHtml’ => ‘false’ to the emailAction, and it made no difference. Still getting HTML entities in the resulting (text only) email.
(By the way, as mentioned above I see that tick marks I type here become proper unicode apostrophes in the forum text… how is that happening? Ditto with ampersand &.)
When a form is input with, for example, an address field that contains Arthez d’Asson Uniform puts Arthez d& # 039 ;Asson in the email and log file. (I’ve added spaces to stop the forum text changing to an apostrophe)
I have also tried ‘escapeHtml’ => ‘false’ and also ‘escapeHtml’ => false in the Email and Log action calls but I still get the HTML entities in the email body and log file record.
Any ideas on how to resolve this would be much appreciated.
Tested with a Kirby 4.0.3 Starterkit in local dev environment (Laravel Herd with PHP 8.1, Nginx) and MailHog on Mac, and with the form and controller example from the Uniform docs.
So the setting does make a difference, at least in the above context.
Thank you, @texnixe, for clarifying the writing of the boolean and solving the issue. I didn’t dare ask any more for fear of being annoying, but thanks to Steve’s joining the thread I have my answer.