mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #7052] [MERGED] fix(url): keep capitalized mailto: and tel: links as they are #6621
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6621
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/7052
Author: @kevin9327
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @MHSanaei
Base:
main← Head:fix/url-scheme-case📝 Commits (1)
f1bc46bfix(url): keep capitalized mailto: and tel: links as they are📊 Changes
2 files changed (+7 additions, -2 deletions)
View changed files
📝
internal/util/common/url.go(+5 -2)📝
internal/util/common/url_test.go(+2 -0)📄 Description
Summary
EnsureURLSchemenow recognizesmailto:andtel:regardless of letter case, so a capitalized support link is no longer turned into anhttps://web URL.Why
The prefix checks were case-sensitive. A support link entered as
Mailto:support@example.comorTEL:+1234567890(phone keyboards capitalize the first letter) came back ashttps://Mailto:support@example.com, which opens a broken web page instead of the mail or phone app. URL schemes are case-insensitive (RFC 3986), andParseRemoteRoutingURLin the same file already acceptsHTTPS://.Type of change
Areas affected
How was this tested?
Added two cases to
TestEnsureURLScheme(Mailto:...andTEL:...). Both fail before the change ("https://Mailto:support@example.com") and pass after;go test ./internal/util/common/passes.Screenshots / recordings
N/A
Breaking changes
None
Checklist
go build ./...and the test suite pass locally. (I ran theinternal/util/commonpackage tests only.)Prepared with help from an AI coding assistant; I reviewed the change and ran the tests above.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.