🐛 Fixed LinkedIn company and school URLs with underscores being rejected as invalid#28893
🐛 Fixed LinkedIn company and school URLs with underscores being rejected as invalid#28893jonhickman wants to merge 1 commit into
Conversation
…ted as invalid LinkedIn company and school page URLs can contain underscores (e.g. /company/eyeshot_2), but the validator only allowed alphanumeric characters and hyphens, causing valid URLs to be incorrectly rejected. Personal /in/ profile URLs do not allow underscores per LinkedIn's own documentation, so the stricter rule is preserved for those.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughLinkedIn URL validation now uses path-specific username rules: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 9m 41s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 3s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-s... |
✅ Succeeded | 2m 16s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 1m 43s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-settin... |
✅ Succeeded | 19s | View ↗ |
nx run ghost:build:assets |
✅ Succeeded | 2s | View ↗ |
nx run ghost:build:tsc |
✅ Succeeded | 6s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-25 06:54:15 UTC

Problem
LinkedIn company and school page URLs can contain underscores — e.g.
https://www.linkedin.com/company/eyeshot_2— but the front-end validator only permitted alphanumeric characters and hyphens, causing these valid URLs to be incorrectly rejected.Solution
Add a separate regex for
companyandschoolpath types that permits underscores in addition to alphanumeric characters and hyphens. The stricter rule (no underscores) is preserved for personal/in/profiles, which follow LinkedIn's documented format of alphanumeric and hyphen only.Testing
New unit tests added covering:
companyandschoolURLs with underscores are accepted/in/URLs with underscores continue to be rejectedAll 179 unit tests pass.