Fork me on GitHub
Subscribe 2

Ticket #402 (fixed enhancement)

Handle relative links in url tags

  • Created: 2011-04-16 13:20:37
  • Reported by: Reines
  • Assigned to: Franz
  • Milestone: 1.4.6
  • Component: parser
  • Priority: normal

If no protocol is provided then prepend the current path instead of just http://

History

Franz 2011-04-21 07:40:32

  • Owner set to Franz.

So should I just prepend the forum base URL?

Franz 2011-04-21 07:46:26

Another possibility would be to only convert "URLs" with trailing slashes to a relative URL, so that something like

/viewforum.php?id=9
would become
http://fluxbb.org/forums/viewforum.php?id=9

on this server, for example.

Reines 2011-04-21 09:39:00

Do you mean leading rather than trailing?

That might be a good idea, though to be honest I'm not incredibly fussed either way.

I was considering using the current URL, but that would then be messy if you have the posts displaying in different places - like we do on the homepage. So yes, probably use the base URL (using get_base_url(true) so it supports https).

Franz 2011-04-21 10:14:27

Yes, I meant leading. wink

And that's how I will do it now. Good point.

Franz 2011-04-21 16:45:28

Commit 2c76d12 to fluxbb fluxbb-1.4

#402: Convert BBCode URLs with leading slash to forum-relative links.

Franz 2011-04-21 16:47:30

  • Status changed from open to fixed.

And ... implemented in 2c76d12.