Links in stories have surrounding spaces stripped

There seems to be a bug in the way that Newsblur deserializes HTML entities in story descriptions that causes it to eat spaces where it shouldn’t be.

For example, look at the feed http://pitchfork.com/rss/reviews/best…. Specifically, I’m looking at the story with the title “Dirty Beaches: Drifters / Love Is the Devil” in NewsBlur’s “feed” mode. The first link’s (‘Dirty Beaches’) closing tag is encoded in the XML as “Beaches</a> isn’t”. However, in NewsBlur, the HTML is rendered (according to Chrome’s web inspector) as “Beachesisn’t”. Notice the missing space after the link text. See this screenshot:

This doesn’t happen with every link (as you can see in the screenshot) and sometimes manifests as the leading space being deleted instead of/in addition to the trailing one. However, it is annoying either way because it causes words to run together.

1 Like

So I introduced this bug about 5 months ago and you are the first person to notice. I follow a feed that does this constantly, so I’ve been aware of it for a while. It has to do with story modifications. I’ve tried fixing it a number of times but it’s harder than it sounds. I may give it another crack someday, but man, it’s a tough one to solve.

OK, good to know it’s on the radar :slight_smile:

Do you have an idea of where in the code the bug is originating from? I’d be interested in seeing the source of it, maybe even give a crack at fixing it – though I obviously know the code way less well than you, and if it’s vexing you, I don’t know if I’d have much of a chance. Still, who knows?

Good luck: https://github.com/samuelclay/NewsBlu…

I’m seeing this as well:

Is this the same issue, or something different?

I see it in web and on the iPhone app.

I’m seeing the same thing. It’s not removing spaces surrounding links, though; it’s removing  's - which for some reason seem to frequently surround links, but they’re getting removed from other places too.

I’ve just noticed that they’re getting removed in Feed view, but not in Text view.