Skip to content

Conversation

@Miexil
Copy link
Member

@Miexil Miexil commented Jan 22, 2026

What does this PR do?

Updated URL regex to handle more cases, they can be checked in the updated tests.
The initial goal was to handle at least :

Should pass the regex:
https://www.anext.com.sg/ (ie, .co.uk format with https & www)
https://www.anext.com.sg/
mabanque.bnpparibas

Should not pass:
www
www.upfluence

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Migrated touched components to Glimmer Components
  • Properly labeled

Note

Strengthens URL validation and significantly expands test coverage.

  • Replaces the old single regex with a composed URL_REGEX that supports optional protocol, www/non-www domains, multi-level TLDs (e.g., .co.uk), paths, queries, and fragments, while excluding IPs, localhost, ports, and non-http(s) schemes
  • Updates unit tests to include extensive valid/invalid cases covering subdomains, mixed case, long paths, file extensions, anchors, and malicious/unsupported patterns

Written by Cursor Bugbot for commit 03da261. This will update automatically on new commits. Configure here.

@Miexil Miexil self-assigned this Jan 22, 2026
@Miexil Miexil requested review from a team and phndiaye as code owners January 22, 2026 08:52
@Miexil Miexil requested review from OwenCoogan and edouardmisset and removed request for a team January 22, 2026 08:52
@linear
Copy link

linear bot commented Jan 22, 2026

Copy link
Contributor

@OwenCoogan OwenCoogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is gonna be a case of "I'm sure you got this" :trollface:

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants