From: Andrew Dolgov Date: Tue, 28 Dec 2010 06:11:49 +0000 (+0300) Subject: fix USER_STYLESHEET for mysql (was broken because of CR escaping X-Git-Tag: 1.5.1~19 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5823f9fbabb610a487b5d50a1a81b33445cfb881;p=tt-rss.git fix USER_STYLESHEET for mysql (was broken because of CR escaping --- diff --git a/functions.php b/functions.php index 3928b2a3..b2694f7e 100644 --- a/functions.php +++ b/functions.php @@ -7059,7 +7059,7 @@ if ($value) { print ""; } diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 1447634b..947dd5c5 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -143,8 +143,10 @@ if ($subop == "setpref") { header("Content-Type: text/plain"); + $value = str_replace("\n", "
", $_REQUEST['value']); + $key = db_escape_string($_REQUEST["key"]); - $value = db_escape_string($_REQUEST["value"]); + $value = db_escape_string($value); set_pref($link, $key, $value); diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index d9de6ab5..bc206be0 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -796,6 +796,8 @@ $value = get_pref($link, "USER_STYLESHEET"); + $value = str_replace("
", "\n", $value); + print T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. This file can be used as a baseline.", "tt-rss.css"); print "";