code: protected String encodeCEFHeader(String text) {
  		String encoded = text;
  		
  		// back-slash encode back-slashes (needs to be first)
  		encoded = encoded.replace("\\","\\\\");
  		
  		// back-slash encode pipes
  		encoded = encoded.replace("|","\\|");
  		
  		// strip carriage returns and newlines
  		encoded = encoded.replace("\r", "");
  		encoded = encoded.replace("\n", "");
  				
  		return encoded;
  	}
docs: header needs to encode '|', '\' '\r', '\n'