diff --git a/classes/rpc.php b/classes/rpc.php index d5e7b937a..a5e32d47e 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -210,9 +210,9 @@ class RPC extends Protected_Handler { } function setpref() { - $value = str_replace("\n", "
", $_REQUEST['value']); - // set_pref escapes input, so no need to double escape it here + $key = $_REQUEST['key']; + $value = str_replace("\n", "
", $_REQUEST['value']); set_pref($this->link, $key, $value, $_SESSION['uid'], $key != 'USER_STYLESHEET');