Views:
67,805β
Votes: 2β
Tags:
php
html
module
syntax-error
Link:
π See Original Answer on Stack Overflow β§ π
URL:
https://stackoverflow.com/q/71403965
Title:
SyntaxError: '' string literal contains an unescaped line break
ID:
/2022/03/09/SyntaxError_-__-string-literal-contains-an-unescaped-line-break
Created:
March 9, 2022
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
Search engine brought me to this Q&A but the solution is totally different. Itβs posted just in case it helps others.
This error was searched:
Uncaught SyntaxError: '' string literal contains an unescaped line break
The line in question contained:
alert('validUrlSyntax: ' + validUrlSyntax +
' validUrlExists: ' + validUrlExists +
' time to check: ' + elapsedTime + ' milliseconds`)
Notice the last apostrophe is really a back tick. Changing the back tick to an apostrophe '
solved the problem.