avoid double amp escaping
authorJoey Hess <joey@kitenet.net>
Tue, 13 Mar 2012 21:48:27 +0000 (17:48 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 13 Mar 2012 21:55:47 +0000 (17:55 -0400)
IkiWiki/Plugin/osm.pm

index 9f43e03e6138390303865fb28752644d8fb2020b..91f23ba1f65c8e8e7a366012f12a108c65de604e 100644 (file)
@@ -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&amp;lon=$lon&amp;zoom=$zoom";
+               $href =~ s!&!&amp;!g;
        }
        $pagestate{$page}{'osm'}{$map}{'waypoints'}{$name} = {
                page => $page,
@@ -196,7 +197,6 @@ sub process_waypoint {
                $output .= preprocess(%params);
        }
        if (!$hidden) {
-               $href =~ s!&!&amp;!g;
                $output .= "<a href=\"$href\"><img class=\"img\" src=\"$icon\" $alt /></a>";
        }
        return $output;