https://bugs.documentfoundation.org/show_bug.cgi?id=61096

--- Comment #7 from Greg Ross <[email protected]> ---
Two updates to the above code, use correct variable for the href name and use
ends-with() to ensure not to catches files like "name.jpeg.txt":

<xsl:choose>
        <xsl:when test="ends-with(upper-case($href), '.JPG') or
ends-with(upper-case($href), '.JPEG')">
                <xsl:text>data:image/jpg;base64,</xsl:text><xsl:value-of
select="office:binary-data"/>
        </xsl:when>
        <xsl:when test="ends-with(upper-case($href), '.SVG')">
                <xsl:text>data:image/svg;base64,</xsl:text><xsl:value-of
select="office:binary-data"/>
        </xsl:when>
        <xsl:otherwise>
                <xsl:text>data:image/png;base64,</xsl:text><xsl:value-of
select="office:binary-data"/>
        </xsl:otherwise>
</xsl:choose>

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to