API update for special characters

Article by

I am the creator of CommentLuv and site owner and administrator of ComLuv.com

Andy Bailey has written 272 articles for ComLuv.com
I normally write at http://comluv.com

Twitter: @commentluv | Facebook | Google Profile
Become a guest blogger on ComLuv just like Andy Bailey
Link

I’ve added some small updates to the ComLuv API so it handles the weird way in which FeedBurner handles special characters saved in post titles.

Don’t be a fancy Nancy!

If you are putting a fancy character in your post titles like a back tick (`) or a fancy quote (“) then feedburner will turn it in some awful special character which is no problem for them or me but, when it gets sent via a JSON string to the browser you’re commenting with, it’ll break it and you’ll either end up with – and … all over the place or worse, it’ll prevent any of your posts from being returned!

Best Practice for Post Titles

Although this code will be able to handle fancy characters from now on, it’s a good idea to try not to use quotes and other fancy characters in your post titles because they will be treated differently by something that uses a different characterset than your blog or they’ll get converted to something that wont be treated right by javascript or other plugins that read your post titles.

The best thing you can do is to treat your post titles like they were being used to save as a files name on your PC. Hyphens (-) are fine, underscores (_) are great! , even spaces ( ) are fine now but, try to steer clear of other punctuation characters and you’ll greatly lessen the chance of breaking things that you send your posts to.

Link

Comments

  1. Ileane
    Twitter:
    says:

    Hi Andy, sorry for causing so much trouble ;) I’m really glad that I mentioned this to you because I’ve noticed the error message off and on in the past. I always thought that it really was some sort of caching issue – based on the error message returned.

    Thanks so much for taking care of this and I’ll be sure to steer clear of the “little nasties”!
    Ileane recently posted..SEO for WordPress via Stephan Spencer on WordPresstvMy Profile

Speak Your Mind

*

CommentLuv badge