X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/854152c299da91cd9e1c27789c8c3fd57b8fb28e..a65e21d2a14b5267d8a5a4fde01d53f3740fbc0a:/IkiWiki/Plugin/osm.pm diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm index b8255bb13..a5af4ed21 100644 --- a/IkiWiki/Plugin/osm.pm +++ b/IkiWiki/Plugin/osm.pm @@ -14,7 +14,7 @@ sub import { hook(type => "format", id => "osm", call => \&format); hook(type => "preprocess", id => "osm", call => \&preprocess); hook(type => "preprocess", id => "waypoint", call => \&process_waypoint); - hook(type => "savestate", id => "waypoint", call => \&savestate); + hook(type => "changes", id => "waypoint", call => \&changes); hook(type => "cgi", id => "osm", call => \&cgi); } @@ -280,7 +280,7 @@ sub scrub_lonlat($$$) { return ($lon, $lat); } -sub savestate { +sub changes { my %waypoints = (); my %linestrings = (); @@ -589,6 +589,7 @@ sub map_setup_code($;@) { } $options{'layers'} = $config{osm_layers}; + $name=~s/'//g; # $name comes from user input return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");"; }