check if text content exists before cleaning carriage returns