#11607 closed defect (bug) (fixed)
Slash Missing in get_index_rel_link()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | minor | Version: | 2.8 |
Component: | Template | Keywords: | has-patch tested |
Focuses: | Cc: |
Description
... in link-template.php it looks like get_bloginfo('siteurl') should be user_trailingslashit(get_bloginfo('siteurl')) because my trailing slash is always missing grrrr.
Attachments (1)
Change History (9)
#2
@
15 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from 2.9.1 to 3.0
get_bloginfo('siteurl') is actually deprecated -- this is its only use in core, apparently -- and user_trailingslashit conditionally slashes a URL depending on the permalink settings, so you're looking for trailingslashit.
I'm finding some other instances like this of 'display' not being triggered in core. Let's do another ticket for that.
#5
follow-up:
↓ 6
@
15 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I confirmed what nacin said earlier, user_trailingslashit was not the correct wrapper for bloginfo('url'). trailingslashit seems to be the norm.
#6
in reply to:
↑ 5
@
15 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Replying to miqrogroove:
I confirmed what nacin said earlier, user_trailingslashit was not the correct wrapper for bloginfo('url'). trailingslashit seems to be the norm.
I went with user_trailingslashit as I believe this fits with the intention of that function.
The other rel links that end up in the head also use it.
We could probably review all calls to trailingslashit and think about whether or not user_trailingslashit should be used but that is the subject of another ticket and is probably a rabbit hole we should not venture down.
#7
@
15 years ago
In particular, the /?p= links are using trailingslashit. I suspect the original intention was to do that only for root paths, but that isn't how it worked out.
#8
@
15 years ago
The point of user_trailingslashit, as I understand it, is to distinguish between the option of www.example.com/2009/03/24/hello-world and www.example.com/2009/03/24/hello-world/.
I suppose that could also be translated to www.example.com and www.example.com/subdirectory/blog versus www.example.com/ and www.example.com/subdirectory/blog/.
p.s. Filter is missing to. The full call should be user_trailingslashit(get_bloginfo('siteurl', 'display')) so that the link can get filtered.