Skip to content

Commit 677bca5

Browse files
committed
reduce possibilities
1 parent 6652052 commit 677bca5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sentry_sdk/spotlight.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ def capture_envelope(self, envelope):
7878
'<script>window.__spotlight = {{ initOptions: {{ fullPage: true, startFrom: "/errors/{event_id}" }}}};</script>\n'
7979
)
8080
CHARSET_PREFIX = "charset="
81-
BODY_CLOSE_TAG = "</body>"
82-
BODY_CLOSE_TAG_POSSIBILITIES = [
83-
"".join(chars)
84-
for chars in product(*zip(BODY_CLOSE_TAG.upper(), BODY_CLOSE_TAG.lower()))
85-
]
81+
BODY_TAG_NAME = "body"
82+
BODY_CLOSE_TAG_POSSIBILITIES = tuple(
83+
"</{}>".format("".join(chars))
84+
for chars in product(*zip(BODY_TAG_NAME.upper(), BODY_TAG_NAME.lower()))
85+
)
8686

8787
class SpotlightMiddleware(MiddlewareMixin): # type: ignore[misc]
8888
__spotlight_script = None # type: Optional[str]

0 commit comments

Comments
 (0)