Skip to content
Permalink
Browse files
Remove GeoIP rendering via OSM to avoid exposing users to possible un…
…safe remote JS libraries (reported by Paul Gevers)
  • Loading branch information
lwindolf committed Mar 22, 2016
1 parent 91739af commit 5f92f23ed977759de6e5b0147d039ea92605770b
Showing with 3 additions and 30 deletions.
  1. +3 −0 ChangeLog
  2. +0 −30 xslt/item.xml.in
@@ -2,6 +2,9 @@ To be released

* Github #309: Update of Japanese translation
(IWAI, Masaharu)
* Removes GeoIP rendering via OSM to avoid exposing
users to remote JS library resources.
(reported by Paul Gevers)


2016-01-30 Lars Windolf <lars.windolf@gmx.de>
@@ -258,36 +258,6 @@

<div id="shading" class="{$shading}">
<div class='content'>
<!-- insertion div for GeoRSS coordinates, adding an OpenStreet map -->
<xsl:if test="attributes/attribute[ @name = 'point' ]">
<p id="mapdiv" style="width:400px;height:200px;float:right; border: 1px solid #000;"></p>
</xsl:if>

<!-- extra item content handling for GeoRSS coordinates, adding an OpenStreet map -->
<xsl:if test="attributes/attribute[ @name = 'point' ]">
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript">
<![CDATA[var lat=]]><xsl:value-of select="substring-before(attributes/attribute[ @name = 'point' ],' ')"/><![CDATA[
var lon=]]><xsl:value-of select="substring-after(attributes/attribute[ @name = 'point' ],' ')"/>
var zoom=9

var map;
function load() {
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
var lonLat = new OpenLayers.LonLat(lon,lat)
.transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
map.getProjectionObject() // to Spherical Mercator Projection
);
var markers = new OpenLayers.Layer.Markers("Markers");
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(lonLat));
map.setCenter (lonLat, zoom);
}
</script>
</xsl:if>

<!-- the item's content -->
<p dir="{$txtDirection}">
<!-- optional gravatar -->

0 comments on commit 5f92f23

Please sign in to comment.