Merged code from the updated version of feedwordpress from the wordpress plugins directory.
Version of the plugin from wordpress is 2012.1218