From 7014a9bf9e785d7dd94786ace34959a43c126d15 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Apr 2012 12:45:00 +0000 Subject: [PATCH] remove trailing whitespace from css in templates --- etemplate/inc/class.soetemplate.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index f0638cce9e..8e0cf19259 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -917,6 +917,10 @@ class soetemplate $str = '$templ_data[] = array('; foreach (self::$db_cols as $db_col => $name) { + if ($name == 'style') // remove trailing whitespace + { + $row[$db_col] = preg_replace('/[ \t]+$/m', '', $row[$db_col]); + } // escape only backslashes and single quotes (in that order) $str .= "'$name' => '".str_replace(array('\\','\'',"\r"),array('\\\\','\\\'',''),$row[$db_col])."',"; }