When the path of an add link action is inadvertently started with a slash, the link produced will be invalid. Not sure if it should be considered a bug since I suppose this will be standard behaviour for the URL function, but since I'm pressed for time at the moment I'm dropping it in the issue queue for your consideration. Maybe the slash should be detected and stripped, probably at configuration time.

Comments

mauritsl’s picture

I added a link to /test, which now links to http://test/. It should be http://hostname/test, so it is indeed a bug. Thanks for reporting. I will look for a solution soon.

mauritsl’s picture

Status: Active » Closed (won't fix)

This cannot be fixed since this is the behavior of url(), which is called inside l().

The following code will produce "//test". The browser will link a <a href="//test" to http://test/.

echo url('/test');