• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 xf function converts message_html to bbcode?

Marcus

Well-known member
#1
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:

Marcus

Well-known member
#2
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 ?
PHP:
<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>
 

Mike

XenForo developer
Staff member
#3
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.