Hey. First off the RSS I am on about is at www.acemta.com
- [MTA] Admin Applications Results!
The news on the homepage is exported from the forums.
My problem is that the RSS feed has styling in it, eg:
Happy New Year everybody!<br /> Well, I suppose I should get started on this.<br /> The Admin team had a tough debate on the Admin applications, and we reached a conclusion on who to accept within the Admin team.<br /> So without further ado, let's get started!<br /> <br /> <br /> We have only accepted two Admin Applications, and those people are <span style='color: #00ff00'><span class='bbc_underline'>Crusad3R</span> </span>(or pravoslavac) and <span style='color: #00ff00'><span class='bbc_underline'>StrangeBrew06</span></span>!<br /> So congratulations to you both. When you see a Head+ Admin online, just /pm him to get your Admin set up in-game!<br /> <br /> Also there have been some more changes, but that is within the GameMaster Team.<br /> Biggi, the Head GM was kicked due to massive inactivity, <del class='bbc'>so that means we have no GMs in our team, meaning that we shall be opening the Head GM spot and accept one person as a new Head GM to make the decisions within the GM team on who else shall become a GM and so on.<br /> Whoever is interested can PM me here on forums for now.</del> ( New Head GM has been selected. )<br /> <br /> So that should be all.<br /> <br /> Have a nice and successful 2013,<br /> MTA Administration Team
<p><font size="2" color="#888888"><?php echo substr($description, 0, 500); ?>
This is the code that outputs the post text. As you can see when it gets to a <span> or something, it messes up the homepage. How can I fix it?
I found this http://perplexed.co.uk/290_html_substr_crop_html_text.htm though it doesn't act as I'd expect in every situation. For example, using your text limited to 50 characters results in a bunch of unneeded <br /> but that could give you a place to start.
Is strip_tags() of interest to you?