web stats
Mirth Community - View Single Post - Escapes and new lines.
View Single Post
Old 02-08-2010, 10:12 PM
simidau simidau is offline
OBX.2 Kenobi
Join Date: Feb 2008
Posts: 62

The whole story on this is the message data comes in a batch file. I then use a channel to split that batch file (it's a strange XML batch beast with the messages inside CDATA tags.
So when I split the messages up I do a replace on the message string (before)
Like this.
prepareString is the message as a string. Channel2 now receives the data in a way that the channel is expecting.

	prepareString = prepareString.replace(/<escape\ V="\.br"\/>/gi, "\\\.br\\");
	prepareString = prepareString.replace(/<escape\ V="\.in[0-9]{1,3}"\/>/gi, "");
	var messageString = new XML(prepareString);
	router.routeMessage('Channel2', messageString);
Hope this helps someone else

Reply With Quote