Fix #811474 ([FB2] Can't read/process "title" tag in images)

This commit is contained in:
Kovid Goyal 2011-07-16 10:39:20 -06:00
parent d5a64ea5e1
commit dc8cc526cf

View File

@ -379,7 +379,8 @@
<!-- image --> <!-- image -->
<xsl:template match="fb:image"> <xsl:template match="fb:image">
<div align="center"> <div align="center">
<img border="1"> <xsl:element name="img">
<xsl:attribute name="border">1</xsl:attribute>
<xsl:choose> <xsl:choose>
<xsl:when test="starts-with(@xlink:href,'#')"> <xsl:when test="starts-with(@xlink:href,'#')">
<xsl:attribute name="src"><xsl:value-of select="substring-after(@xlink:href,'#')"/></xsl:attribute> <xsl:attribute name="src"><xsl:value-of select="substring-after(@xlink:href,'#')"/></xsl:attribute>
@ -388,7 +389,10 @@
<xsl:attribute name="src"><xsl:value-of select="@xlink:href"/></xsl:attribute> <xsl:attribute name="src"><xsl:value-of select="@xlink:href"/></xsl:attribute>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</img> <xsl:if test="@title">
<xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
</xsl:if>
</xsl:element>
</div> </div>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>