fix issue with nested span tags or possibly with process_text flag when div is nested within paragraph tag