I have a HTML / Javascript page with some textarea. The user are typing their text with enter to create new lines. The problem lies when the form is submitted via ajax (with the functionnality of jQuery) to PHP. The text is received but without the enter.
How do you pass enters from HTML textarea to PHP?
I’m in POST in this context.
The textarea content the following
asdf
éè ï
"
‘
“
||
@£¢¤¬¦²³³
But the PHP receive the following:
asdféè ï"’“||@£¢¤¬¦²³³
You’re probably not converting newlines into breaklines:
And to make it safe for output: