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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/252887-unterminated-string-literal-error/#findComment-1296605 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.