Commit 61ce6482 authored by Bart Vullings's avatar Bart Vullings

ZP-1269 Bugfix carddav backend support newlines in note field. Released under...

ZP-1269 Bugfix carddav backend support newlines in note field. Released under the Affero GNU General Public License (AGPL) version 3.
parent d788cf91
...@@ -1266,6 +1266,9 @@ class BackendCardDAV extends BackendDiff implements ISearchProvider { ...@@ -1266,6 +1266,9 @@ class BackendCardDAV extends BackendDiff implements ISearchProvider {
} }
if (empty($val) || preg_match('/^(\;)+$/', $val) == 1) if (empty($val) || preg_match('/^(\;)+$/', $val) == 1)
continue; continue;
// Support newlines in values
$val = str_replace("\n", "\\n", $val);
// Remove trailing ; // Remove trailing ;
$val = substr($val, 0, -1); $val = substr($val, 0, -1);
if (strlen($val) > 50) { if (strlen($val) > 50) {
...@@ -1442,4 +1445,4 @@ class BackendCardDAV extends BackendDiff implements ISearchProvider { ...@@ -1442,4 +1445,4 @@ class BackendCardDAV extends BackendDiff implements ISearchProvider {
return $addressbookId; return $addressbookId;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment