Fix encoding problem in textarea

htmlentities not working consitently due to encoding,
changed to htmlspecialchars