diff --git a/code/extensions/BlogFilter.php b/code/extensions/BlogFilter.php index 8717a4e..d9db56e 100644 --- a/code/extensions/BlogFilter.php +++ b/code/extensions/BlogFilter.php @@ -23,6 +23,7 @@ class BlogFilter extends Lumberjack { $stage = '_' . $stage; } + $stage = Convert::raw2sql($stage); $dataQuery = $staged->dataQuery() ->innerJoin('BlogPost', sprintf('"BlogPost%s"."ID" = "SiteTree%s"."ID"', $stage, $stage)) ->where(sprintf('"PublishDate" < \'%s\'', Convert::raw2sql(SS_Datetime::now())));