[Yanel-commits] rev 44007 - public/yanel/trunk/src/contributions/resources/search/htdocs

michi at wyona.com michi at wyona.com
Wed Aug 5 12:30:21 CEST 2009


Author: michi
Date: 2009-08-05 12:30:21 +0200 (Wed, 05 Aug 2009)
New Revision: 44007

Modified:
   public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl
Log:
check if url starts with http

Modified: public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl
===================================================================
--- public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl	2009-08-05 10:15:31 UTC (rev 44006)
+++ public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl	2009-08-05 10:30:21 UTC (rev 44007)
@@ -60,7 +60,7 @@
 
   <xsl:template match="y:result">
     <li>
-      <a href="{$yarep.back2realm}{@url}"><xsl:choose><xsl:when test="y:title"><xsl:value-of select="y:title"/></xsl:when><xsl:otherwise><xsl:value-of select="@url"/></xsl:otherwise></xsl:choose></a>
+      <a><xsl:attribute name="href"><xsl:choose><xsl:when test="starts-with(@url, 'http')"><xsl:value-of select="@url"/></xsl:when><xsl:otherwise><xsl:value-of select="$yarep.back2realm"/><xsl:value-of select="@url"/></xsl:otherwise></xsl:choose></xsl:attribute><xsl:choose><xsl:when test="y:title"><xsl:value-of select="y:title"/></xsl:when><xsl:otherwise><xsl:value-of select="@url"/></xsl:otherwise></xsl:choose></a>
     </li>
   </xsl:template>
 



More information about the Yanel-commits mailing list