usage of url tag fails with relative links [message #15145] |
Wed, 03 December 2003 21:56 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Up to RC8 it was possible to use the url tag of FUD for relative links as well. This makes sense if you just want to point to something on the same server and saves some typing.
However I've just noticed that this seems to be somewhat broken. When providing a relative url by using:
[url=../doc/RTFM.php]Manual[/url]
an "http://" gets appended and terribly messes up the whole thing.
However, providing an absolute url doesn't work either because then the "http://" will be appended once more and cause an invalid url.
Correcting this link or restore it to a relative url by editing the message will make the link completely go away. The editing mode then will reveal some html code used for generating the link, which shouldn't be around at all.
I don't know whether it's been already fixed, but I thought mentioning it couldn't hurt. The installation is a stock RC 9 with the exception that I replaced the src file which caused the newline issue (see other thread started by me) with the fixed one from CVS.
Olliver
|
|
|
Re: usage of url tag fails with relative links [message #15146 is a reply to message #15145] |
Wed, 03 December 2003 22:43 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
This is intentional. Many people seems to put things like www.furbar.com into URLs and the missing http:// prefix results in a broken URL. All but a few 'expert' users realize and use things like ../ or /blah/blah/ etc...
I'll review the code and see if ../ and / support can be added back in.
FUDforum Core Developer
|
|
|
|
Re: usage of url tag fails with relative links [message #15201 is a reply to message #15198] |
Fri, 05 December 2003 13:06 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The 'relative' urls below seems to work fine, is there something I am forgetting to test?
../
/
Please keep in mind that relative URLs such as ../ will not work with PATH_INFO because they would be relative path will include path_info.
FUDforum Core Developer
|
|
|
Re: usage of url tag fails with relative links [message #15207 is a reply to message #15201] |
Fri, 05 December 2003 13:32 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Well, I wonder why relative urls always worked before RC9 despite using path info. I don't think this is the result of me being too stupid to correctly enter a relative path. I'm constantly doing it when pointing to threads which have already been discussed.
It is broken when you use it like that:
[url=theme/default/images/top_members.png]Members[/url]
It correctly shows "members" as link however the relative url is borked (http is appended)
------------------------------
[img]theme/default/images/top_members.png[/img]
works as expected
------------------------------
[url=../topbar.gif]link[/url]
../topbar.gif
link works, but the name is wrong, it should be "link"
---------------
works as expected
I always give a short name to my links to avoid endless trails of arguments behind a query string which may mess up the forum's formating. But as you see, the issues are independent from "path info"
HTH
Olliver
[Updated on: Fri, 05 December 2003 13:47] Report message to a moderator
|
|
|
Re: usage of url tag fails with relative links [message #15208 is a reply to message #15207] |
Fri, 05 December 2003 13:37 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The relative URLs with path_info thanks to base href that is set in the header.
The relative URLs that start with a non ../ or / I have not considered and will need to review the code to make sure those still work.
[url=../topbar.gif]link[/url] handling is a bug and I'll work on getting it fixed.
FUDforum Core Developer
|
|
|
|
Re: usage of url tag fails with relative links [message #15210 is a reply to message #15209] |
Fri, 05 December 2003 13:51 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Hm. I've just corrected the code for the img tag. This caused the first example to completely disappear though I didn't touch it. Looking at the code it modified the original code to that:
<a href="http://theme/default/images/top_members.png" target="_blank"></a>
Quite annoying issue, but for some reasons it still works for the img tag.
Olliver
|
|
|
|
Re: usage of url tag fails with relative links [message #15213 is a reply to message #15212] |
Fri, 05 December 2003 15:20 |
Olliver
Messages: 443 Registered: March 2002
Karma: 0
|
Senior Member |
|
|
Doesn't entirely solve the problem. The good thing is, the http:// no longer gets appended. But there's sort of unexpected behaviour now.
if I use the link
[url=theme/default/images/top_members.png]Members[/url] are here.
and edit the post it will cause the output to disappear because the link gets modified to that:
[url=theme/default/images/top_members.png][/url].
anything beyond the the closing "url" tag gets cut off.
Olliver
[Updated on: Fri, 05 December 2003 15:22] Report message to a moderator
|
|
|
|
|