
Sorry for the long response.
This might be the difference between a Mac and a PC and how they interpret keystrokes.
I’ve noticed that on PC’s when you hit the single quote key (usually next to the Enter/Return key), it does a single “curly” quote (known as a ’ in the HTML character entity chart), where as Mac’s do a single “straight” quote (known as a ' on the HTML character entity chart).
The difference is subtle, but makes a difference when being encoded by PHP or HTML.
https://dev.w3.org/html5/html-author/charref
The ' cause the problems I have been having, because we have a lot of them in French and I’m working on a Mac. When coding in HTML or PHP, usually single quotes are interpreted as the '. But as you can see from the name, they are technically more grammatically correct as they are actually apostrophes (apos), whereas the other is a right-single-quote (rsquo). My guess is that the PC’s way of using the rsquo is probably smarter as to avoid this exact problem I am having, but whatever.
The problem is you can tell me to switch to using rsquo by changing the setting on my Mac (see attached image) but that won’t solve the problem for others in a similar situation.
I am still a noob to coding (6-month bootcamp), so my solution might be totally wrong, but it might be wiser to encode all EventOn text fields using the PHP function htmlspecialchars or htmlentities with ENT_QUOTES before sending it to the database to prevent this issue. Of the two, htmlentities seems wiser as it takes into account more HTML entities, whereas htmlspecialchars only does the big 5 (“,’,&,<,>). https://www.php.net/manual/en/function.htmlentities.php.
Then when retrieving the code from the database, use the htmlentities with ENT_QUOTES to decode those same HTML character entities, though that might not be necessary if they were already encoded as HTML entities before sending them to the database, and the client side browser should then be able to correctly convert the ' to ‘ when displaying, thought I’m not 100% sure.
Hope that makes sense, and again, sorry for the long response. Let me know your thoughts.

