WPT format documents causing application to hang because of some characters or extra space