problem with relative links
deepstar - August 4, 2007 - 22:31
| Project: | Planet |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
it seems that the Planet module handles relative URL's wrong.
Suppose I have a blogpost at http://www.host.com/node/1234 which contains images using the gallery module, for example http://www.host.com/index.php?q=gallery...
The image tag contains a relative URL to /index.php?q=gallery
Planet translates that relative link into http://www.host.com/node/1234/index.php?q=gallery in the function planet_convert_relative_urls()
This is wrong.
I added the following 2 lines at the beginning of that function to resolve the problem:
$parsed = parse_url($base_url);
$base_url = $parsed['scheme'] ."://". $parsed['host'];kind regards,
-- Steven Van Acker

#1
TODO: is this still the case for 6.x-1.3?