Replace spaces in generated file names with underscores, and replace multiple consecutive underscores with a single underscore. Fixes #1705

[SVN r45234]
This commit is contained in:
Daniel James 2008-05-08 22:07:28 +00:00
parent 3d0e98ea74
commit f0c7c3d9b9

View File

@ -28,7 +28,7 @@
<xsl:choose> <xsl:choose>
<xsl:when test="not($recursive)"> <xsl:when test="not($recursive)">
<!-- translate dots into directory separators, and replace illegal file path characters with underscores --> <!-- translate dots into directory separators, and replace illegal file path characters with underscores -->
<xsl:value-of select="translate( $basename, '.&lt;&gt;\:*?&quot;|', '/_______' )"/> <xsl:value-of select="translate(normalize-space(translate($basename, '._&lt;&gt;\:*?&quot;|', '/ ' )), ' ', '_')"/>
<xsl:value-of select="$html.ext"/> <xsl:value-of select="$html.ext"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>