Skip to content

Commit cce2f3f

Browse files
authored
Merge pull request #99 from wakatime/bugfix/sanitize-plugin
sanitize user agent
2 parents eb9d90c + 584e9d4 commit cce2f3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

electron/watchers/wakatime.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ export class Wakatime {
386386
const appNameSafe = appName.replace(/\s/g, "");
387387
const appVersion = appData?.version?.replace(/\s/g, "") || "unknown";
388388

389-
return `${appNameSafe}/${appVersion} ${this.versionString}`;
389+
return `${appNameSafe}/${appVersion} ${this.versionString}`.replace(
390+
/[\u{0080}-\u{FFFF}]/gu,
391+
"",
392+
);
390393
}
391394
}

0 commit comments

Comments
 (0)