I think I am having a brain fart on this as I have not worked on this sort of thing for a long time and it used to work… I think something may have changed.
I am using PHP 7.4.
I have a form with a textarea:
<div class="form-group"><textarea class="form-control" rows="10" name="ticketcomments" placeholder="Your question or comments" required></textarea></div>
When the user submits the form I have htmlspecialchars in place:
@mrmbarnes: when you post code on the forums, you need to format it so it will display correctly.
You can highlight your code, then use the </> button in the editor window, or you can place three backticks ``` (top left key on US/UK keyboards) on a line above your code, and three on a line below your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.
Ah, this can be an annoying little problem. Try the below code in your PHP processor for that specific field, this may not be exact depending on your current PHP but should look something like below:
Wow, made me reference the processor where I grabbed the snippet from in my files…that was from the pre 5.3 era. Good callout, I will change for the OP.