Hi.
Perhaps a lot of you heart this problem, but i can't find a solution.
Java Script is crashing when see \n sign.
I have a lot of functions like this:

function drawDocumentMainRowColor1(unique, content, align, padding, color) {
    drawDocumentHTML += '<tr class="stdTab" bgcolor="#' + color + '"><td>&nbsp;</td><td style="padding: ' + padding + 'px 10px;" colspan="2" align="' + align + '">' + content + '</td></tr>';
}

..where content is any string. Now if in string appear \n or \r sign page is dead. (JS error)

T U for any help

instead of \n use document.write("<br />"
c if it works

It wont work so easy, cause content is from form. Its user, who write a content, so i cant request writing <br> instead \n.
But its ok, ive solved it in another way.

how did you solved the problem ???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.