]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/osm.pm
make icon absolute
[ikiwiki.git] / IkiWiki / Plugin / osm.pm
index 9f43e03e6138390303865fb28752644d8fb2020b..be499495c4f7e65722773c73974b12e8eba3fcb2 100644 (file)
@@ -151,7 +151,7 @@ sub process_waypoint {
                        last;
                }
        }
-       $icon = urlto($icon, $dest);
+       $icon = urlto($icon, $dest, 1);
        $tag = '' unless $tag;
        if ($page eq $dest) {
                if (!defined($config{'osm_format'}) || !$config{'osm_format'}) {
@@ -176,7 +176,8 @@ sub process_waypoint {
                zoom => $zoom,
        );
        if (defined($destsources{htmlpage($map)})) {
-               $href = urlto($map,$page) . "?lat=$lat&lon=$lon&zoom=$zoom";
+               $href = urlto($map,$page) . "?lat=$lat&lon=$lon&zoom=$zoom";
+               $href =~ s!&!&!g;
        }
        $pagestate{$page}{'osm'}{$map}{'waypoints'}{$name} = {
                page => $page,
@@ -196,7 +197,6 @@ sub process_waypoint {
                $output .= preprocess(%params);
        }
        if (!$hidden) {
-               $href =~ s!&!&!g;
                $output .= "<a href=\"$href\"><img class=\"img\" src=\"$icon\" $alt /></a>";
        }
        return $output;