From 5690e088fc7350484c313fb3cf38eef595eee47f Mon Sep 17 00:00:00 2001 From: poltawski Date: Sun, 23 Dec 2007 14:15:50 +0000 Subject: [PATCH] MDL-10607 - also support backslashes in dbuser/password in installer merged from MOODLE_19_STABLE --- install.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install.php b/install.php index 63b25faa03..e36d68d2c0 100644 --- a/install.php +++ b/install.php @@ -1282,10 +1282,11 @@ function toggledbinfo() { } /** - * Add slashes for single quotes so they can be - * included in single quoted string + * Add slashes for single quotes and backslashes + * so they can be included in single quoted string + * (for config.php) */ function addsingleslashes($input){ - return str_replace("'", "\'", $input); + return preg_replace("/(['\\\])/", "\\\\$1", $input); } ?> -- 2.39.5