add safe filter back into template