A seat link is cut from a report to the end of its string, so a name with a quote, an ampersand or a hash in it cannot end the cut before the token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141G6xqLeNRYEtviLWSB5Up
This commit is contained in:
Eric Wagoner
2026-10-17 20:14:41 -04:00
co-authored by Claude Opus 5.5
parent 6606853332
commit 3368a92cf5
+2 -1
View File
@@ -6,7 +6,8 @@ import * as Sentry from "@sentry/browser";
* the history breadcrumb for taking it out of the address bar still names
* it, so it is cut from every report before one leaves the browser. */
function scrub(text: string): string {
return text.replace(/(#seat=)[^&#\s"']*/g, "$1…");
// The cut runs to the end of the JSON string, whatever the name holds.
return text.replace(/(#seat=)(?:[^"\\]|\\.)*/g, "$1…");
}
// Errors only — no tracing, no replay. Without a DSN baked at build time