Skip to content

Commit 52e480b

Browse files
committed
chore(analytics): restore � escape in stripLoneSurrogates
Unintentional drift from a mid-task file rewrite — the literal U+FFFD character was written into the source instead of the original � escape. Functionally identical, but restores the original bytes.
1 parent bd84d33 commit 52e480b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/backend/src/app/api/latest/analytics/events/batch

apps/backend/src/app/api/latest/analytics/events/batch/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const LONE_SURROGATE_RE = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF
2222

2323
function stripLoneSurrogates(value: unknown): unknown {
2424
if (typeof value === "string") {
25-
return value.replace(LONE_SURROGATE_RE, "");
25+
return value.replace(LONE_SURROGATE_RE, "\uFFFD");
2626
}
2727
if (Array.isArray(value)) {
2828
return value.map(stripLoneSurrogates);

0 commit comments

Comments
 (0)