The filter code is a copy and paste from the doc. Maybe the code should be in an include file, so we're sure the preview and the documentation code are the same?