A string having "<br/">" displays an unterminated string literal js error string
I am extracting some data from Db and displaying it in a text box using jquery as follows.
$('#textareatest').val('<% =teststring %>'). It is possible that the string teststring may contain line breaks XHTML ( <br/>). whenever the line contains <br/>, I get an error 'unterminated string literal'. I saw several posts viewing '\ n' as line breaks and suggesting avoiding this. I tried to avoid the <br/>same way, but that didn't work.
Can someone help me with this?
UPDATE: . I have already escaped single quotes. here is an example string test string<br />
Thank.
, - . , , .
, , , - , , - .
, , , , , .
, - -, , , . , :
, ( ") (') . ; . :
" blah "'blah'" 1234 "" \n " , , . , JavaScript. \b backspace\f form feed\n \r \ t tab\
4,5.
, , , .
, . . ,
var quote =" "The Cremation " R.W. Service. "document.write()
" " R.W. Service. , . , c:\temp , :
var home =" c:\temp"
:
- ,
console.log, .
, - , - , .