Newline crashes calendar

How do you cope when someone enters a newline into a textarea field in an input popup which enters it into a Database? It crashes the Calendar the next time the information is read from the Database if they do. It you have change the newline to a br> instead then the update popup has br> instead of a newline in the textarea field? Is the only way to deal with it to replace the newline with nothing? I know there is a missing < before the br but when I typed the full br into this question it came out as a new line instead

Hi @Pam_Whittaker

Can you describe with a bit more detail what do you mean on “crashes the calendar”? Do you get a javascript error? How do you pass the events to the calendar?

Can you share a few lines of code or a screenshot on the actual usage?


Syntax error string literal contains an unescaped line break is the JavaScript error

The line is

TheDescription = “<% Response.Write(TheDescriptions) %>”

I am passing the text string of descriptions from TheDescriptions created in Classic asp to the JavaScript TheDescription ready for splitting by commas. It works perfectly unless there is a new line in one of the descriptions. Not an error I have ever seen before. If I replace the newline in Classic asp with
it works but you then get
as part of the description not a new line when you click on a popup so I am not sure what I should do.


I ended up replaceing CHR(10) with br> then replacing the br> back to \n in the JavaScript which works perfectly. Replacing \n with \\n or anything else like that didn’t make any difference