Details
-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.2.6
-
Fix Version/s: Unscheduled
-
Component/s: CiviEvent
-
Versioning Impact:Patch (backwards-compatible bug fixes)
Description
The location in the iCal include new line (\n). For example go to:
http://drupal.demo.civicrm.org/civicrm/event/ical?reset=1&list=1
There is an event with the location:
LOCATION:581O Lincoln Dr SW\n Santa Fe\, NM 87594\n United
States\n
But this isn't displayed well, at least with Evolution (https://projects.gnome.org/evolution/), I suggest that the street, city and state are separated by a coma.
One (dirty) way to do it is in the file:
administrator/components/com_civicrm/civicrm/CRM/Event/Page/ICalendar.php
After the line:
$info = CRM_Event_BAO_Event::getCompleteInfo($start, $type, $id, $end);
Add:
// First we replace the new line by a coma
$info[0]['location'] = preg_replace('/[\n\r]/', ", ", $info[0]['location']);
// then if there is a coma at the end we delete it
$info[0]['location'] = preg_replace('/, $/', "", $info[0]['location']);