[wp-trac] [WordPress Trac] #44764: Missing slash between protocol and domain in fallback of wp.api.utils.getRootUrl()

WordPress Trac noreply at wordpress.org
Thu Aug 9 13:25:46 UTC 2018


#44764: Missing slash between protocol and domain in fallback of
wp.api.utils.getRootUrl()
----------------------------------+----------------------------------------
 Reporter:  ocean90               |      Owner:  (none)
     Type:  defect (bug)          |     Status:  new
 Priority:  normal                |  Milestone:  Future Release
Component:  REST API              |    Version:  4.7
 Severity:  normal                |   Keywords:  needs-patch good-first-bug
  Focuses:  javascript, rest-api  |
----------------------------------+----------------------------------------
 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/`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44764>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list