Item12868: applied DavidAllen's patch for handling newlines in multi-line text