Merge branch '5.9' into 5

This commit is contained in:
Maxime Rainville 2021-08-26 17:00:48 +12:00
commit 1637a29cb4
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}