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