Opened 6 years ago
Last modified 6 years ago
#46791 reopened defect (bug)
esc_url() adding http:// to a relative URL to parent directory '../pathname/'
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Formatting | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
esc_url()
adds 'http://' when it shouldn't.
Line 4191 wp-includes/formatting.php states
If the URL doesn't appear to contain a scheme, we presume it needs http:// prepended (unless a relative link starting with /, # or ? or a php file).
This is prepending http:// to a relative url to a parent directory i.e. ../path-to-page/
Funtion needs ../ adding to the array or some regex code.
Attachments (2)
Change History (8)
#4
follow-up:
↓ 5
@
6 years ago
- Keywords has-patch added; needs-patch removed
@OrangePixelNath did you mean to close this ticket? If so, can you detail why? What did you discover that made your report incorrect or unnecessary?
#5
in reply to:
↑ 4
@
6 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
Replying to desrosj:
@OrangePixelNath did you mean to close this ticket? If so, can you detail why? What did you discover that made your report incorrect or unnecessary?
No sorry. I'm new to the system so didn't understand what was next.
Proposed patch.