sanitize post_id centrally