Opened 6 years ago
Closed 6 years ago
#44764 closed defect (bug) (fixed)
Missing slash between protocol and domain in fallback of wp.api.utils.getRootUrl()
Reported by: | ocean90 | Owned by: | kadamwhite |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | good-first-bug has-patch commit |
Focuses: | javascript, rest-api | Cc: |
Description
If window.location.origin
isn't set, getRootUrl()
falls back to window.location.protocol
, a single slash and window.location.host
. The result of this is an URL with one missing slash between the protocol and the domain because window.location.protocol
only contains the protocol and the colon. Example output: http:/localhost:3000/
Attachments (2)
Change History (10)
#2
@
6 years ago
- Keywords needs-unit-tests added
- Milestone changed from Future Release to 5.0
- Owner set to kadamwhite
- Status changed from new to accepted
This ticket was mentioned in Slack in #core-restapi by kadamwhite. View the logs.
6 years ago
#4
@
6 years ago
Refreshed patch to apply cleanly on the develop repo. Looks good, @abdullahramzan, thank you for tackling this!
Note: See
TracTickets for help on using
tickets.
Slash Fix