Index: date_api.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/date/date_api.module,v retrieving revision 1.64.2.5.2.78 diff -u -p -r1.64.2.5.2.78 date_api.module --- date_api.module 25 Mar 2009 12:04:38 -0000 1.64.2.5.2.78 +++ date_api.module 25 Apr 2009 02:30:06 -0000 @@ -1550,7 +1550,7 @@ function date_limit_format($format, $gra // After removing the non-desired parts of the format, test if the only // things left are escaped, non-date, characters. If so, return nothing. - if (!$test = preg_replace('(\\\\\w{1})', '', $format)) { + if (!$test = trim(preg_replace('(\\\\\w{1})', '', $format))) { return ''; } return $format; @@ -2454,4 +2454,4 @@ function date_range_string($years) { $max = '+'. ($years[1] - $this_year); } return $min .':'. $max; -} \ No newline at end of file +}