Opened 8 years ago
Last modified 4 years ago
#12567 new enhancement
Image macro should support protocol-relative URLs
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-dev-1.7.x |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | imagemacro |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
For example, //www.edgewall.org/gfx/trac_bullet.png
could be used on WikiStart.
URLs starting with //
should be interpreted as protocol-relative. Unfortunately, the Image macro interprets URLs starting with //
as server-relative. If we were starting again, I might suggest we use something like ^//
for server-relative.
The only idea I have is to use ://
to indicate protocol-relative URLs. Other ideas are welcome.
Attachments (0)
Change History (13)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
It doesn't sound sensible to require custom markup for standard things.
//
should be interpreted as protocol-relative, /
server-relative, with no further specification needed.
comment:3 by , 8 years ago
We cannot change the existing implementation and break uses of Image macro in existing installations.
comment:4 by , 8 years ago
It might be good to support also protocol-relative URL to TracLinks#Server-relativelinks.
comment:5 by , 8 years ago
Protocol-relative links is probably a good idea. I looked at making the change, but it's pretty extensive and I don't think I'll find time to implement it now.
follow-up: 7 comment:6 by , 8 years ago
Hi Ryan,
First I'd like to thank the TRAC team for their excellent work.
I agree with comment:3.
I have aprox. 20 TRAC instances running and I would rather bite the bullet and update the all TRAC DBs via an sql script. I like TRAC in particular for the TracLinks and if things can be standardised - even better.
In the same context, I miss putting relative links into the trac.ini. Can this be improved as well ?
follow-up: 8 comment:7 by , 8 years ago
Replying to anonymous:
In the same context, I miss putting relative links into the trac.ini. Can this be improved as well ?
Specifically, for which options do you want to use relative links?
follow-up: 9 comment:8 by , 8 years ago
Replying to Ryan J Ollos:
Replying to anonymous:
In the same context, I miss putting relative links into the trac.ini. Can this be improved as well ?
Specifically, for which options do you want to use relative links?
I'd like to use relative links in mainnav together with https://trac-hacks.org/wiki/MenusPlugin. Do you think that's possible ?
comment:9 by , 8 years ago
Replying to anonymous:
I'd like to use relative links in mainnav together with https://trac-hacks.org/wiki/MenusPlugin. Do you think that's possible ?
Could you give a specific example of how you'd configure [mainnav]
with a relative link?
comment:12 by , 5 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Proposed changes in log:rjollos.git:t12567_image_macro_protocol_relative_urls.