Opened 6 weeks ago
Last modified 5 days ago
#65417 new defect (bug)
Bug: Classic Editor link dialog prepends http:// to URLs with uppercase protocol
| Reported by: | nimeshatxecurify | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | javascript |
Description (last modified by )
Steps to Reproduce
- Go to
http://localhost:8889/wp-admin - Create or edit a post/page
- Switch to the Classic Editor (Visual tab)
- Select some text (e.g. "click here") OR place the cursor in the editor
- Click the Insert/Edit Link button (chain icon in the toolbar)
- In the URL field, type:
HTTPS://example.com(uppercase protocol — common on mobile keyboards with auto-capitalization) - Click outside the URL field / press Tab (triggers the blur event →
correctURLruns)
Expected: URL remains HTTPS://example.com (or is normalized to https://example.com)
Actual: URL becomes http://HTTPS://example.com — a completely broken double-protocol URL
Attachments (3)
Change History (16)
This ticket was mentioned in PR #12103 on WordPress/wordpress-develop by @nimeshatxecurify.
6 weeks ago
#1
- Keywords has-patch has-unit-tests added
This ticket was mentioned in Slack in #core by nimeshatxecurify. View the logs.
6 weeks ago
This ticket was mentioned in Slack in #core by abdullahramzan. View the logs.
6 weeks ago
#7
@
6 weeks ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/12103
Environment
- WordPress: 7.1-alpha-20260605.071112
- Subdirectory: No
- PHP: 8.3.31
- Server: PHP.wasm
- Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
- Browser: Chrome 148.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.5
- MU Plugins: None activated
- Plugins:
- Classic Editor 1.7.0
- Test Reports 1.3.0
Steps taken
- ✅ Patch is solving the problem
Expected result
- After applying the patch, the issue with Classic Editor link dialog prepends http:// to URLs with uppercase protocol has been resolved.
Screenshots/Screencast with results
#8
@
5 weeks ago
Tested patch. Uppercase protocol issue is fixed.
Typed HTTPS://example.com in the URL field, and after blur/Tab it correctly remains as uppercase (or normalizes to lowercase) instead of prepending http://.
No double-protocol URLs. Works as expected.
#9
@
5 weeks ago
- Milestone Awaiting Review → 7.1
Confirmed in 6.9 as well. Moving to 7.1 for consideration.
#10
@
5 weeks ago
Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/12103
Environment
- WordPress: 7.1-alpha-20260605.071112
- Subdirectory: No
- PHP: 8.3.31
- Database: WP_SQLite_Driver
- Browser: Chrome
- OS: Windows 11
- Theme: Twenty Twenty-Five
- MU Plugins: None activated
- Plugins:
- Classic Editor 1.7.0
- Test Reports 1.3.0
Steps taken
- Applied the patch from the PR.
- Tested the Classic Editor link dialog with URLs containing uppercase protocol values.
Result
- Patch successfully resolves the reported issue.
- URLs with uppercase protocols no longer get incorrectly modified by prepending
http://.
Expected result
The Classic Editor link dialog should preserve the original URL protocol format without adding an unwanted http:// prefix.
#11
@
2 weeks ago
I tested this issue in WordPress Playground with the Classic Editor plugin enabled. Following the reported reproduction steps, I entered an uppercase protocol (HTTPS://seorepairkit.com) in the link URL field and triggered the blur event by moving focus away from the input. The URL was handled correctly and was not modified to http://HTTPS://seorepairkit.com. I also verified that repeatedly opening and interacting with the link did not result in an additional http:// prefix being added. The protocol was preserved (or normalized to lowercase) without creating a duplicate protocol.
#13
@
5 days ago
Tested using the WordPress Playground instance linked from the GitHub PR.
Environment
- WordPress Playground (PR preview)
- Browser: Firefox
- OS: macOS
Tested
- HTTPS://bestwebsite.com
- HTTP://bestwebsite.com
- Https://bestwebsite.com
- https://bestwebsite.com
- http://bestwebsite.com
- ftp://example.com
- /about
- #section1
Confirmed uppercase and mixed-case URL schemes are preserved correctly and http:// is no longer prepended. Existing lowercase protocols, relative URLs, and fragment links also continue to behave as expected. I also verified the links after saving the post, reloading the editor, and editing the links again.
Patch tested successfully.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)


Updates the regex used in the link dialog to support schemes with uppercase letters. This prevents the editor from prepending
http://to URLs likeHTTPS://orHttp://, which are commonly produced by mobile keyboards.Includes new QUnit tests to verify correct handling of uppercase, mixed-case, fragment, and root-relative URLs.
Trac ticket: https://core.trac.wordpress.org/ticket/65417
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6