so I've got a little db editor thing going...
echo ' <td onclick="editQuestion('.$q_id.', '.
$q_c.', \''.
addslashes(htmlspecialchars($q_q, ENT_NOQUOTES)).'\', \''.
preg_replace('/\n/', '\n', addslashes(htmlspecialchars($q_a, ENT_NOQUOTES))).'\');">'.
$q_q.'</td>'.NL;
please not the 4th line (begining with preg_replace)
it should, in my opinion, get rid of newlines in the db and replace them with \n. this works... sorta... lemme show you the result in the html:
<td onclick="editQuestion(1, 1, 'How can I change my account leverage?', 'The leverage requirement is set automatically by system default to 3 levels;
\ntehis
\nfdsa
\nfds
\nfdsa
\nfds');">How can I change my account leverage?</td>
aint that a beut? a \n at the begining of every new line... but the newline is still there
any takers?