fix: Validate external URLs before rendering as links
Summary
- Add
isSafeExternalUrlutility function to validate URL protocols - Apply validation to Twitter profile links from Hiveposh API
- Prevents potentially unsafe URL schemes (e.g.,
javascript:,data:) from being rendered as clickable links
Test plan
-
Verify Twitter badge still renders for profiles with valid Twitter URLs -
Verify Twitter badge does not render if API returns invalid URL scheme