diff --git a/lib/Property/ICalendar/CalAddress.php b/lib/Property/ICalendar/CalAddress.php index 2dbbc6eaf..c190f4750 100644 --- a/lib/Property/ICalendar/CalAddress.php +++ b/lib/Property/ICalendar/CalAddress.php @@ -53,7 +53,11 @@ public function getNormalizedValue() return $input; } list($schema, $everythingElse) = explode(':', $input, 2); + $schema = strtolower($schema); + if($schema == "mailto") { + $everythingElse = strtolower($everythingElse); + } - return strtolower($schema).':'.$everythingElse; + return $schema.':'.$everythingElse; } } diff --git a/tests/VObject/Property/ICalendar/CalAddressTest.php b/tests/VObject/Property/ICalendar/CalAddressTest.php index a907daf5c..e7490869f 100644 --- a/tests/VObject/Property/ICalendar/CalAddressTest.php +++ b/tests/VObject/Property/ICalendar/CalAddressTest.php @@ -25,6 +25,8 @@ public function values() return [ ['mailto:a@b.com', 'mailto:a@b.com'], ['mailto:a@b.com', 'MAILTO:a@b.com'], + ['mailto:a@b.com', 'mailto:A@B.COM'], + ['mailto:a@b.com', 'MAILTO:A@B.COM'], ['/foo/bar', '/foo/bar'], ]; }