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

XF 1.4 strip bbcode from post template function?

#1
i'm editing my open_graph_meta template to support twitter cards. so far, i have:

Code:
<xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
    <meta property="og:site_name" content="{$xenOptions.boardTitle}" />
    <meta property="og:image" content="{xen:helper fullurl, @ogLogoPath, 1}" />
    <meta property="og:type" content="{xen:if $ogType, $ogType, article}" />
    <meta property="og:url" content="{xen:raw $url}" />
    <meta property="og:title" content="{$thread.title}" />
    <xen:if is="{$description}"><meta property="og:description" content="{xen:raw $description}" /></xen:if>
    {xen:raw $ogExtraHtml}
    <xen:if is="{$xenOptions.facebookAppId}"><meta property="fb:app_id" content="{$xenOptions.facebookAppId}" /></xen:if>
    <xen:if is="{$xenOptions.facebookAdmins}"><meta property="fb:admins" content="{xen:helper implode, {$xenOptions.facebookAdmins}, ','}" /></xen:if>
</xen:if>

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@SquatThePlanet">
<meta name="twitter:title" content="{$thread.title}">
<meta name="twitter:description" content="{xen:raw $description}">
<meta name="twitter:image" content="{xen:helper fullurl, @ogLogoPath, 1}">
which works pretty well, but i still occasionally get bbcode like [ ATTACH ] and urls in the description. is there a template tag to display a thread's content without bbcode? thanks!
 

Mike

XenForo developer
Staff member
#2
BB code is already removed. What you're seeing are intentional placeholders for "rich" content that can't be represented as plain text.