Monkuar Posted December 10, 2011 Share Posted December 10, 2011 var lol="hey <br>"; document.REPLIER.Post.value=lol.replace(/<br\s*[\/]?>/gi, "\n"); I am trying to replace all <br> tags in my var "lol" but I get the "unterminated string literal" error on line 2 which is: document.REPLIER.Post.value=lol.replace(/<br\s*[\/]?>/gi, "\n"); Any help? Link to comment https://forums.phpfreaks.com/topic/252887-unterminated-string-literal-error/ Share on other sites More sharing options...
nogray Posted December 10, 2011 Share Posted December 10, 2011 Your code is correct, probably you have something above it that is causing the error. Link to comment https://forums.phpfreaks.com/topic/252887-unterminated-string-literal-error/#findComment-1296605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.