X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/d92a19ff0886ee8518e4ccfc79a2c64feeac7213..1e0389fffbc33ad235e717756cb8b0b361f5b93b:/IkiWiki/Plugin/osm.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm index 511fe3c9b..84e43b710 100644 --- a/IkiWiki/Plugin/osm.pm +++ b/IkiWiki/Plugin/osm.pm @@ -71,26 +71,15 @@ sub preprocess { my $lon = $params{'lon'}; # sanitized below my $href = $params{'href'}; - my $fullscreen = defined($params{'fullscreen'}); # sanitized here my ($width, $height, $float); - if ($fullscreen) { - $height = '100%'; - $width = '100%'; - $float = 0; - } - else { - $height = scrub($params{'height'} || "300px", $page, $dest); # sanitized here - $width = scrub($params{'width'} || "500px", $page, $dest); # sanitized here - $float = (defined($params{'right'}) && 'right') || (defined($params{'left'}) && 'left'); # sanitized here - } + $height = scrub($params{'height'} || "300px", $page, $dest); # sanitized here + $width = scrub($params{'width'} || "500px", $page, $dest); # sanitized here + $float = (defined($params{'right'}) && 'right') || (defined($params{'left'}) && 'left'); # sanitized here + my $zoom = scrub($params{'zoom'} // $config{'osm_default_zoom'} // 15, $page, $dest); # sanitized below my $map; - if ($fullscreen) { - $map = $params{'map'} || $page; - } - else { - $map = $params{'map'} || 'map'; - } + $map = $params{'map'} || 'map'; + $map = scrub($map, $page, $dest); # sanitized here my $name = scrub($params{'name'} || $map, $page, $dest); @@ -114,7 +103,7 @@ sub preprocess { width => $width, float => $float, zoom => $zoom, - fullscreen => $fullscreen, + fullscreen => 0, editable => defined($params{'editable'}), lat => $lat, lon => $lon,