Removes invalid markup.