about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authornatalie <22222885+espeon@users.noreply.github.com>2025-04-23 07:54:41 -0500
committerGitHub <noreply@github.com>2025-04-23 05:54:41 -0700
commit555dd6a4dbef8f11bec70dd3b4d9d4d433aaaa23 (patch)
tree2944b34e69dc885264d116f3aeb2360cc9069cc7 /src
parent1fe94ba290cd3ec3fbdc9a4c9fa3ccb58ccfd8e3 (diff)
downloadvoidsky-555dd6a4dbef8f11bec70dd3b4d9d4d433aaaa23.tar.zst
Sanitize handle in header (#8272)
* Sanitize handle in header

* use prefix param correctly
Diffstat (limited to 'src')
-rw-r--r--src/screens/Profile/Header/Handle.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/screens/Profile/Header/Handle.tsx b/src/screens/Profile/Header/Handle.tsx
index 27b73da70..a8bf65692 100644
--- a/src/screens/Profile/Header/Handle.tsx
+++ b/src/screens/Profile/Header/Handle.tsx
@@ -3,7 +3,7 @@ import {AppBskyActorDefs} from '@atproto/api'
 import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
-import {isInvalidHandle} from '#/lib/strings/handles'
+import {isInvalidHandle, sanitizeHandle} from '#/lib/strings/handles'
 import {isIOS} from '#/platform/detection'
 import {Shadow} from '#/state/cache/types'
 import {atoms as a, useTheme, web} from '#/alf'
@@ -49,7 +49,9 @@ export function ProfileHeaderHandle({
             : [a.text_md, a.leading_snug, t.atoms.text_contrast_medium],
           web({wordBreak: 'break-all'}),
         ]}>
-        {invalidHandle ? _(msg`⚠Invalid Handle`) : `@${profile.handle}`}
+        {invalidHandle
+          ? _(msg`⚠Invalid Handle`)
+          : sanitizeHandle(profile.handle, '@')}
       </Text>
     </View>
   )