diff --git a/civicrm/CRM/Utils/System/WordPress.php b/civicrm/CRM/Utils/System/WordPress.php
index 4f8c32b30583b98f1d1e6f4e43e2f40cc93641c7..446668e10f9b2c4e20556d5af0c75906555e7542 100644
--- a/civicrm/CRM/Utils/System/WordPress.php
+++ b/civicrm/CRM/Utils/System/WordPress.php
@@ -420,6 +420,11 @@ class CRM_Utils_System_WordPress extends CRM_Utils_System_Base {
     }
     require_once $cmsRootPath . DIRECTORY_SEPARATOR . 'wp-includes/pluggable.php';
     $uid = CRM_Utils_Array::value('uid', $name);
+
+    // Disable magic quotes
+    $wp = new CiviCRM_For_WordPress();
+    $wp->remove_wp_magic_quotes();
+
     if (!$uid) {
       $name = $name ? $name : trim(CRM_Utils_Array::value('name', $_REQUEST));
       $pass = $pass ? $pass : trim(CRM_Utils_Array::value('pass', $_REQUEST));