From ffb2d729c6753a6b336b385b67376948486d1ebb Mon Sep 17 00:00:00 2001
From: Fredrik Åslund <fredrik.aslund@umu.se>
Date: Mon, 8 Jul 2013 10:12:08 +0200
Subject: bad newlines normalized

---
 xslt/idp-summary.xslt | 30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)

diff --git a/xslt/idp-summary.xslt b/xslt/idp-summary.xslt
index bbb88a2a..5eb9b6f8 100644
--- a/xslt/idp-summary.xslt
+++ b/xslt/idp-summary.xslt
@@ -54,19 +54,15 @@
   </xsl:template>
 
   <xsl:template match="md:EmailAddress">
-     <xsl:value-of select="text()"/><xsl:text> \\</xsl:text>
+    <xsl:value-of select="normalize-space(text())"/><xsl:text> </xsl:text><xsl:text> \\</xsl:text>
   </xsl:template>
 
   <xsl:template match="md:OrganizationDisplayName">
-     <xsl:call-template name="string-replace-all">
-       <xsl:with-param name="text" select="text()" />
-       <xsl:with-param name="replace" select="'|'" />
-       <xsl:with-param name="by" select="'\|'" />
-     </xsl:call-template>
+    <xsl:value-of select="normalize-space(text())"/><xsl:text> </xsl:text>
   </xsl:template>
 
   <xsl:template match="md:OrganizationURL">
-     <xsl:value-of select="text()"/>
+    <xsl:value-of select="normalize-space(text())"/><xsl:text> </xsl:text>
   </xsl:template>
 
   <xsl:template match="shibmd:Scope">
@@ -76,24 +72,4 @@
   <xsl:template match="*"/>
   <xsl:template match="text()"/>
 
-  <xsl:template name="string-replace-all">
-    <xsl:param name="text" />
-    <xsl:param name="replace" />
-    <xsl:param name="by" />
-    <xsl:choose>
-      <xsl:when test="contains($text, $replace)">
-        <xsl:value-of select="substring-before($text,$replace)" />
-        <xsl:value-of select="$by" />
-        <xsl:call-template name="string-replace-all">
-          <xsl:with-param name="text" select="substring-after($text,$replace)" />
-          <xsl:with-param name="replace" select="$replace" />
-          <xsl:with-param name="by" select="$by" />
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$text" />
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
 </xsl:stylesheet>
-- 
cgit v1.2.3