trim feed input to remove illegal space or linebreaks in XML documents