I feed a string to my textarea.
The string contains HTML strings, such as ©, é, etc.
I need these strings to be displayed as such (©, é) and not be turned into © and é respectively.
How would I do it?
Escape them properly, that is turn & into & in this case.
Though, if you feed them using the .value assignment, your problem is not with textarea and your string is deentitified before getting into javascript variable.
& back into &?<form>. When the form gets submitted, it posts the content of the textarea into another PHP script, which writes info into the MySQL. The MySQL must have those HTML characters as HTML characters, not their graphic representation.<textarea><?=htmlentities($string)?></textarea> instead.javascript, not php? :)