diff --git a/code/Model/Recipient/EmailRecipient.php b/code/Model/Recipient/EmailRecipient.php index e8e37e1..6a056d8 100644 --- a/code/Model/Recipient/EmailRecipient.php +++ b/code/Model/Recipient/EmailRecipient.php @@ -542,7 +542,7 @@ class EmailRecipient extends DataObject $templatePath = substr($absoluteFilename, strlen($prefixToStrip) + 1); // Optionally remove "templates/" ("templates\" on Windows respectively) prefixes - if (preg_match('#(?<=templates' . DIRECTORY_SEPARATOR . ').*$#', $templatePath, $matches)) { + if (preg_match('#(?<=templates' . preg_quote(DIRECTORY_SEPARATOR, '#') . ').*$#', $templatePath, $matches)) { $templatePath = $matches[0]; }