Skip to content

Commit 49bf583

Browse files
committed
API excerpts: Apply templates to description before escaping. Fixes #21.
1 parent c1f72fa commit 49bf583

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tasks/jquery-xml/entries2html-base.xsl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@
1616
</xsl:call-template>,
1717
"excerpt":
1818
<xsl:call-template name="escape-string">
19-
<xsl:with-param name="s" select="/entries/desc|//entry[1]/desc/text()|//entry[1]/desc/*"/>
19+
<xsl:with-param name="s">
20+
<xsl:choose>
21+
<xsl:when test="/entries/desc">
22+
<xsl:apply-templates select="/entries/desc"/>
23+
</xsl:when>
24+
<xsl:otherwise>
25+
<xsl:apply-templates select="//entry[1]/desc"/>
26+
</xsl:otherwise>
27+
</xsl:choose>
28+
</xsl:with-param>
2029
</xsl:call-template>,
2130
"termSlugs": {
2231
"category": [

0 commit comments

Comments
 (0)