diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-05-23 13:26:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-23 13:26:10 +0200 |
commit | 30ac7ec2bfd0b98a3ddd0ce332775d62ec4cf3ba (patch) | |
tree | 3fb0da34ed54b69b5ddad1dc92e3bc20c6413e04 | |
parent | 250db249b5f32e112186dfb63e091faa89e68aaf (diff) | |
parent | 4b5379309e0efd8c125cb445ebf842412da6a342 (diff) | |
download | nextcloud-server-30ac7ec2bfd0b98a3ddd0ce332775d62ec4cf3ba.tar.gz nextcloud-server-30ac7ec2bfd0b98a3ddd0ce332775d62ec4cf3ba.zip |
Merge pull request #5004 from nextcloud/bugfix/fix_replacing_4mbunicode_for_calendar_properties_table
fix replacing of 4MB Unicode Chars in cal props table
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/CalDavBackendTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index fcf73cb0f31..ef3df8de83e 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2009,7 +2009,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription if (in_array($property->name, self::$indexProperties)) { $value = $property->getValue(); // is this a shitty db? - if ($this->db->supports4ByteText()) { + if (!$this->db->supports4ByteText()) { $value = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $value); } $value = substr($value, 0, 254); diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index dc531b5a64a..fa298282d7e 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -539,7 +539,7 @@ CREATED;VALUE=DATE-TIME:20130910T125139Z UID:47d15e3ec8 LAST-MODIFIED;VALUE=DATE-TIME:20130910T125139Z DTSTAMP;VALUE=DATE-TIME:20130910T125139Z -SUMMARY:123 Event +SUMMARY:123 Event 🙈 DTSTART;VALUE=DATE-TIME:20130912T130000Z DTEND;VALUE=DATE-TIME:20130912T140000Z ATTENDEE;CN=test:mailto:foo@bar.com |