Fixed RSS Feed does not parse HTML correctly

Chris D

XenForo developer
Staff member
This was reported by Jeff Fuqua here: http://xenforo.com/community/threads/rss-parsing-issue.31959

It applies, seemingly to all RSS feeds and appears to be a bug in how XenForo converts the HTML to BB Code for displaying in a thread.

Here's an example feed: http://fulltextrssfeed.com/espn.go.com/blog/feed?blog=afcsouth

The HTML of the an item in that feed is here:

HTML:
<div>� <strong>AFC Scenarios</strong>: <a href="http://espn.go.com/blog/afceast/tag/_/name/nfl-scenarios-2012" target="_blank">East</a> | <a href="http://espn.go.com/blog/afcwest/tag/_/name/nfl-scenarios-2012" target="_blank">West</a> | <a href="http://espn.go.com/blog/afcnorth/tag/_/name/nfl-scenarios-2012" target="_blank">North</a> | <a href="http://espn.go.com/blog/afcsouth/tag/_/name/nfl-scenarios-2012" target="_blank">South</a><p><em>Yes, the start of training camps is two months away, but it’s never too early to consider the coming season. A look at the best-case and worst-case scenarios for the Titans in 2012.</em></p><p><img src="http://a.espncdn.com/i/teamlogos/nfl/med/trans/ten.gif" alt="" width="80" height="80" class="floatright"/><strong>Dream scenario (11-5):</strong> <a href="http://espn.go.com/nfl/player/_/id/13969/jake-locker">Jake Locker</a> beats out <a href="http://espn.go.com/nfl/player/_/id/1575/matt-hasselbeck">Matt Hasselbeck</a> in the training camp quarterback battle and never looks back. The second-year signal-caller provides huge energy for the Titans, alleviating concerns about his accuracy. He spreads the ball around to a nice stable of receivers, including <a href="http://espn.go.com/nfl/player/_/id/12556/kenny-britt">Kenny Britt</a>, who stays healthy all season; <a href="http://espn.go.com/nfl/player/_/id/9307/nate-washington">Nate Washington</a>, who matches last year’s effort; and <a href="http://espn.go.com/nfl/player/_/id/14909/kendall-wright">Kendall Wright</a>, who catches on quickly and doesn’t look like a rookie.</p><p>With a running quarterback under center and all those receivers helping stretch the field, <a href="http://espn.go.com/nfl/player/_/id/11258/chris-johnson">Chris Johnson</a> gets room and has a big rebound year. Defenses have to decide: Stack the box and risk yielding big passes or keep numbers in coverage and see CJ break off chunks.</p><p>The pass rush fares far better than last season because <a href="http://espn.go.com/nfl/player/_/id/9599/kamerion-wimbley">Kamerion Wimbley</a> proves to be a great signing -- one that's made even more so because the offense gives Tennessee leads that make opponents one-dimensional.</p><p>Mike Munchak is a coach of the year candidate in line for an extension as he takes the Titans to the playoffs.</p><p><strong>Nightmare scenario (5-11):</strong> They head into camp thinking they have two quarterbacks but wind up with one getting hurt and the other struggling. Britt’s not healthy, Wright’s not effective and Johnson doesn’t rebound from last year, prompting speculation that his time as a playmaker has passed.</p><p>With inconsistent offense and not a lot of points, too much falls on the defense.</p><p>Teams get them in nickel and attack the guy in the slot. The Titans roll through several options there and none of them prove nearly as effective as <a href="http://espn.go.com/nfl/player/_/id/9801/cortland-finnegan">Cortland Finnegan</a> was. <a href="http://espn.go.com/nfl/player/_/id/13248/derrick-morgan">Derrick Morgan</a> can’t mount the healthy and productive pass-rush campaign the team was banking on and Wimbley is also unable to lead any sort of consistent charge at opposing quarterbacks.</p><p>The Titans finish the year talking about how much better Locker will be in 2013. They also enter an uncertain time with Munchak and his staff, which head into the final year of their contracts not having shown they warrant extensions.</p></div><img src="http://pixel.quantserve.com/pixel/p-89EKCgBk8MZdE.gif" border="0" height="1" width="1" />

If you follow the below link, this is how it should output:

http://www.valvetime.net/feedproblem.html

This is how it actualy outputs:

http://www.valvetime.net/feedproblem_xf.html

That to me is a bug.

As you can see, the most prominent problem is that XenForo separates paragraphs with only single line breaks.

Here, I wrote an add-on which unofficially fixes the problem: http://xenforo.com/community/threads/rss-parsing-issue.31959/#post-365639
 
Top Bottom