diff --git a/client/karma.js b/client/karma.js index b5a6f76b4..50651037b 100644 --- a/client/karma.js +++ b/client/karma.js @@ -240,7 +240,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document) } if (returnUrl) { if (!/^https?:\/\//.test(returnUrl)) { - throw new Error(`Security: Navigation to ${returnUrl} was blocked to prevent malicious exploits.`) + throw new Error( + 'Security: Navigation to '.concat( + returnUrl, + ' was blocked to prevent malicious exploits.' + ) + ) } location.href = returnUrl } diff --git a/static/karma.js b/static/karma.js index 7d7e49a97..f0b2548af 100644 --- a/static/karma.js +++ b/static/karma.js @@ -250,7 +250,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document) } if (returnUrl) { if (!/^https?:\/\//.test(returnUrl)) { - throw new Error(`Security: Navigation to ${returnUrl} was blocked to prevent malicious exploits.`) + throw new Error( + 'Security: Navigation to '.concat( + returnUrl, + ' was blocked to prevent malicious exploits.' + ) + ) } location.href = returnUrl }