Sample link :
some_dir/test.html
Sample site :
http://www.somewhere.com/bob
Bug:
http://www.somewhere.com\/some_dir/test.html
Fixed:
http://www.somewhere.com/bob/some_dirtest.html
Explanation:
Bug:
$link_path_parts["dirname"] = $site_path_parts["dirname"]."/".$link_path_parts["dirname"];
Fixed:
$link_path_parts["dirname"] = "/".$site_path_parts["filename"]."/".$link_path_parts["dirname"];