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

News Feed Import - Strip HTML?

#1
I have a news feed coming in and posting to my forum occasionally and it's working great, except..... the titles include HTML bold tags.

So I need to be able to strip the <b> tags from the titles. How can I do that? Is there a way to do it in templates? A setting I'm missing?
 

Mike

XenForo developer
Staff member
#2
That would require a code change. We expect HTML in the content potentially, but we have no concept of it in the title (I don't think it's normally expected but it's possibly ambiguous).
 
#3
Well I could handle some easy str_replace() coding. I just need to know where to start. Any tips?

Right now my titles are all messed up and look like this...

Hey You Look at My <b>Awesome</b> Title!

With the HTML printed like that.
 

Jake Bunce

XenForo moderator
Staff member
#4
That requires an addon. Or you can modify this file directly:

library/XenForo/Model/Feed.php

The "prepareFeedEntry" function operates on the feed content before it is posted. This requires some coding ability.