fix USER_STYLESHEET for mysql (was broken because of CR escaping

This commit is contained in:
Andrew Dolgov 2010-12-28 09:11:49 +03:00
parent 947daa10a1
commit 5823f9fbab
3 changed files with 6 additions and 2 deletions

View File

@ -7059,7 +7059,7 @@
if ($value) {
print "<style type=\"text/css\">";
print $value;
print str_replace("<br/>", "\n", $value);
print "</style>";
}

View File

@ -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);

View File

@ -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\">";