remove invalid XML chars, final solution closes #298
phantomjs