summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-12-28 09:11:49 +0300
committerAndrew Dolgov <[email protected]>2010-12-28 09:11:49 +0300
commit5823f9fbabb610a487b5d50a1a81b33445cfb881 (patch)
tree168f83cee9034fcde79dbb41b9cb1c71b9443471 /modules
parent947daa10a1a86d4dad738ae789cc2fc8ec28d5d6 (diff)
fix USER_STYLESHEET for mysql (was broken because of CR escaping
Diffstat (limited to 'modules')
-rw-r--r--modules/backend-rpc.php4
-rw-r--r--modules/popup-dialog.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index 1447634bf..947dd5c50 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", "<br/>", $_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 d9de6ab53..bc206be07 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -796,6 +796,8 @@
$value = get_pref($link, "USER_STYLESHEET");
+ $value = str_replace("<br/>", "\n", $value);
+
print T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. <a target=\"_blank\" class=\"visibleLink\" href=\"%s\">This file</a> can be used as a baseline.", "tt-rss.css");
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";