replaceNewLines = function(obj, prop) {
  if (obj) {
    obj[prop] = (obj[prop] || '').replace(/\n\s+/g, ' ');
  }
}
Replace the new lines in an object property.
@param {!Object} obj Object with properties.
@param {string} prop Property name.