XF 2.0 xf function converts message_html to bbcode?


Well-known member
This is a "I want to approve stuff that my team removed as spam" approach. Is there a xf function to convert xf_spam_trigger_log.details.JSON->_POST->message_html into simple plaintext or bbcode.
Last edited:


Well-known member
On https://stackoverflow.com/questions/4308734/how-to-convert-html-to-bbcode they mention a php xslt text output mode function, but I think there might be some internal xf function ?
<xsl:output method="text">
<xsl:template match="b|strong">[b]<xsl:apply-templates/>[/b]</xsl:template>
<xsl:template match="br">&#10;</xsl:template>
<xsl:template match="p">&#10;<xsl:apply-templates/>&#10;</xsl:template>
<xsl:template match="a">[url="<xls:value-of select="@href"/>"]<xsl:apply-templates/>[/url]</xsl:template>


XenForo developer
Staff member
See XF\Html\Renderer\BbCode.

But if the content was submitted and edited, you can likely find the original content in the edit history for a post.