diff --git a/Sources/Db/Schema/Table.php b/Sources/Db/Schema/Table.php index c91e3e83225..c133376053c 100644 --- a/Sources/Db/Schema/Table.php +++ b/Sources/Db/Schema/Table.php @@ -563,7 +563,7 @@ public function populate(bool $replace = false): int } } - $replacements['{$default_reserved_names}'] = strtr($replacements['{$default_reserved_names}'], ['\\\\n' => '\\n']); + $replacements['{$default_reserved_names}'] = strtr($replacements['{$default_reserved_names}'], ['\\\\n' => "\n", '\\n' => "\n"]); // Replace any placeholders in the initial data. foreach ($this->initial_data as &$row) { diff --git a/Sources/Unicode/SpoofDetector.php b/Sources/Unicode/SpoofDetector.php index 598462873a5..8a9d155023a 100644 --- a/Sources/Unicode/SpoofDetector.php +++ b/Sources/Unicode/SpoofDetector.php @@ -242,7 +242,7 @@ public static function checkReservedName(string $name, bool $fatal = false): boo // This will hold all the names that are similar to $name. $homograph_names = []; - $reserved_names = explode("\n", Config::$modSettings['reserveNames']); + $reserved_names = preg_split('~\R|\\\\n~', Config::$modSettings['reserveNames']); // Check each name in the list... foreach ($reserved_names as $reserved) {