Planet formation in post-common-envelope binaries