Make replaceNewLines() function usable elsewhere.  Fix up 'table' parameter.