]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix replacing of 4MB Unicode Chars in cal props table 5005/head
authorGeorg Ehrke <developer@georgehrke.com>
Sun, 21 May 2017 11:18:58 +0000 (13:18 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Sun, 21 May 2017 11:27:16 +0000 (13:27 +0200)
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
apps/dav/lib/CalDAV/CalDavBackend.php
apps/dav/tests/unit/CalDAV/CalDavBackendTest.php

index fcf73cb0f31aff67899b7105fcee2cda9c3a70e0..ef3df8de83ec007d2ae4bc52b631ff201cdf98ef 100644 (file)
@@ -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);
index dc531b5a64a3d7c590a372813c139a2d57400a51..fa298282d7e9af13a754d8a63d75d287c00d0a97 100644 (file)
@@ -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