Trim comment and convert newline characters
[infodrom.org/service.infodrom.org] / class / calendar_item.class.php
index 2eeb005..822bd79 100644 (file)
@@ -132,7 +132,7 @@ class Calendar_Item extends DatabaseTable {
     $item = array('dav_id' => $this->id,
                  'name' => strlen($data['name']) ? $data['name'] : NULL,
                  'url' => strlen($data['url']) ? $data['url'] : NULL,
-                 'comment' => strlen($data['comment']) ? $data['comment'] : NULL,
+                 'comment' => strlen($data['comment']) ? nl2br(trim($data['comment'])) : NULL,
                  'sys_user' => $_SERVER['REMOTE_USER'],
                  'sys_edit' => 'now()');