diff --git a/modules/filter/filter.module b/modules/filter/filter.module index 6ea0537..e059685 100644 --- a/modules/filter/filter.module +++ b/modules/filter/filter.module @@ -429,15 +429,15 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) { if (isset($text) && (!$check || filter_access($format))) { $format = filter_resolve_format($format); + // See if caching is allowed for this format. + $cache = filter_format_allowcache($format); + // Check for a cached version of this piece of text. $cache_id = $format .':'. md5($text); - if ($cached = cache_get($cache_id, 'cache_filter')) { + if ($cache && $cached = cache_get($cache_id, 'cache_filter')) { return $cached->data; } - // See if caching is allowed for this format. - $cache = filter_format_allowcache($format); - // Convert all Windows and Mac newlines to a single newline, // so filters only need to deal with one possibility. $text = str_replace(array("\r\n", "\r"), "\n", $text);