summaryrefslogtreecommitdiff
path: root/xsl
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-08-24 09:59:10 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-08-24 09:59:10 +0200
commit1214694692fd98226494b4228d419f7e972a1200 (patch)
tree2707b409c04223c77e256fd2be68e40bc90335ac /xsl
parent17515dc1d60a5d4175485208a1c2dce51f74e619 (diff)
downloadmutti-web-1214694692fd98226494b4228d419f7e972a1200.tar.gz
mutti-web-1214694692fd98226494b4228d419f7e972a1200.tar.bz2
mutti-web-1214694692fd98226494b4228d419f7e972a1200.zip
googlemaps: Encode iframe url, if encode_uri is available
Diffstat (limited to 'xsl')
-rw-r--r--xsl/googlemaps.xsl17
1 files changed, 15 insertions, 2 deletions
diff --git a/xsl/googlemaps.xsl b/xsl/googlemaps.xsl
index fd8fc55..3c84f11 100644
--- a/xsl/googlemaps.xsl
+++ b/xsl/googlemaps.xsl
@@ -2,7 +2,9 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="https://beratung-franzke.de/web-tpl">
+ xmlns:s="https://beratung-franzke.de/web-tpl"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="str">
<xsl:template match="s:googlemap" mode="html">
<xsl:call-template name="googlemap">
@@ -50,9 +52,20 @@
<xsl:variable name="map_base_uri" select="concat($base_uri, '&amp;source=s_q&amp;output=embed&amp;q=')" />
<xsl:variable name="link_base_uri" select="concat($base_uri, '&amp;source=embed&amp;output=embed&amp;q=')" />
+ <xsl:variable name="map_uri">
+ <xsl:choose>
+ <xsl:when test="function-available('str:encode-uri')">
+ <xsl:value-of select="str:encode-uri(concat($map_base_uri, $location), false())" />-->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($map_base_uri, $location)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:element name="iframe">
<xsl:attribute name="src">
- <xsl:value-of select="concat($map_base_uri, $location)" />
+ <xsl:value-of select="$map_uri" />
</xsl:attribute>
<xsl:attribute name="width"><xsl:value-of select="$width" /></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$height" /></xsl:attribute>