OPAL-1667: Replace LF and CR with corresponding escaped characters.