Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tell `git revert` not to follow renames (CVE-2016-10026)
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
osm.pm
diff --git
a/IkiWiki/Plugin/osm.pm
b/IkiWiki/Plugin/osm.pm
index c9650d014aa1348f9c83efb77e87c76f20620452..472e26945a75575215218294c2a01cc68748bbf3 100644
(file)
--- a/
IkiWiki/Plugin/osm.pm
+++ b/
IkiWiki/Plugin/osm.pm
@@
-507,7
+507,7
@@
sub include_javascript ($) {
}
}
if ($loader) {
}
}
if ($loader) {
- return embed_map_code($page) . "<script type=\"text/javascript\"
charset=\"utf-8\"
>$loader</script>";
+ return embed_map_code($page) . "<script type=\"text/javascript\">$loader</script>";
}
else {
return '';
}
else {
return '';
@@
-534,7
+534,7
@@
sub cgi($) {
print "<html><body>";
print "<div id=\"mapdiv-$map\"></div>";
print embed_map_code();
print "<html><body>";
print "<div id=\"mapdiv-$map\"></div>";
print embed_map_code();
- print "<script type=\"text/javascript\"
charset=\"utf-8\"
>";
+ print "<script type=\"text/javascript\">";
print map_setup_code($map, $map,
lat => "urlParams['lat']",
lon => "urlParams['lon']",
print map_setup_code($map, $map,
lat => "urlParams['lat']",
lon => "urlParams['lon']",
@@
-589,6
+589,7
@@
sub map_setup_code($;@) {
}
$options{'layers'} = $config{osm_layers};
}
$options{'layers'} = $config{osm_layers};
+ $name=~s/'//g; # $name comes from user input
return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
}
return "mapsetup('mapdiv-$name', " . to_json(\%options) . ");";
}