diff --git a/sentry_sdk/spotlight.py b/sentry_sdk/spotlight.py
index 1555afb829..a783b155a1 100644
--- a/sentry_sdk/spotlight.py
+++ b/sentry_sdk/spotlight.py
@@ -66,7 +66,8 @@ def capture_envelope(self, envelope):
SPOTLIGHT_JS_ENTRY_PATH = "/assets/main.js"
SPOTLIGHT_JS_SNIPPET_PATTERN = (
- ''
+ "\n"
+ '\n'
)
SPOTLIGHT_ERROR_PAGE_SNIPPET = (
'\n'
@@ -113,7 +114,8 @@ def spotlight_script(self):
)
urllib.request.urlopen(req)
self._spotlight_script = SPOTLIGHT_JS_SNIPPET_PATTERN.format(
- spotlight_js_url
+ spotlight_url=self._spotlight_url,
+ spotlight_js_url=spotlight_js_url,
)
except urllib.error.URLError as err:
sentry_logger.debug(