secret content now actually parsed when not hidden

This commit is contained in:
skyanth 2019-04-09 15:24:12 +02:00
parent c1812e5506
commit e296da240c

View File

@ -5,17 +5,22 @@
<!-- black out anything you don't want seen -->
<xsl:template match="secret">
<xsl:if test="/pentest_report[@secrets = 'hide']">
<xsl:choose>
<xsl:when
test="img | p | div | table | section | appendix | ol | ul | pre">
<fo:block xsl:use-attribute-sets="censoredtext" >[ CENSORED ]</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:inline xsl:use-attribute-sets="censoredtext">[ CENSORED ]</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:choose>
<xsl:when test="/pentest_report[@secrets = 'hide']">
<xsl:choose>
<xsl:when
test="img | generate_piechart | p | div | table | section | ol | ul | pre">
<fo:block xsl:use-attribute-sets="censoredtext">[ CENSORED ]</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:inline xsl:use-attribute-sets="censoredtext">[ CENSORED ]</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>