Textarea not rendering apostrophes correctly
I have a contact form, and for the textarea anytime someone writes a word containing an apostrophe, it renders it as an html character code - \'
So If someone were to type: Hello I'm Sergio - I would get in my email: Hello I\'m Sergio.
Does it have anything to do with htmlspecialchars? Or is it something else?
This is for a wordpress site, and the textarea code is as follows:
Thanks so much for any input.
<textarea rows="10" cols="39" name="cf-message" required>' . ( isset( $_POST["cf-message"] ) ? esc_attr( $_POST["cf-message"] ) : '' ) . '</textarea>
Sorry, I meant to say - it renders it as an html character code - Thank you.
This may shed some light on it, as it sounds like an "escape method" in your textarea, which of course, is executing special characters into their original coding (in other words, in reverse of what you would code special characters in .. & etc.)
Hope this is a decent starting point?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread