diff --git a/apps/rebreak-magic/app/composables/useDeviceStatus.ts b/apps/rebreak-magic/app/composables/useDeviceStatus.ts index a12c1fe..81efc6e 100644 --- a/apps/rebreak-magic/app/composables/useDeviceStatus.ts +++ b/apps/rebreak-magic/app/composables/useDeviceStatus.ts @@ -30,7 +30,7 @@ function normalizePlatform(value: string | null | undefined): ComputedDevice["pl } function normalizeHostname(value: string): string { - return (value.toLowerCase().split(".")[0] ?? "").trim(); + return (value.toLowerCase().split(".")[0] ?? "").replace(/[^a-z0-9]/g, ""); } export function useDeviceStatus( diff --git a/apps/rebreak-magic/app/composables/useProtectionStatus.ts b/apps/rebreak-magic/app/composables/useProtectionStatus.ts index 6e0f1a2..43d6def 100644 --- a/apps/rebreak-magic/app/composables/useProtectionStatus.ts +++ b/apps/rebreak-magic/app/composables/useProtectionStatus.ts @@ -16,7 +16,7 @@ const IPHONE_POLL_INTERVAL = 5000; const DEVICE_REFRESH_INTERVAL = 30000; function normalizeHostname(value: string): string { - return (value.toLowerCase().split(".")[0] ?? "").trim(); + return (value.toLowerCase().split(".")[0] ?? "").replace(/[^a-z0-9]/g, ""); } export function useProtectionStatus() {