It is strictly prohibited to tell blasphemous or bawdy jokes. Allah (Exalted be He) says:
If you ask them (about this), they declare: "We were only talking idly and joking." Say: "Was it at Allâh (عز وجل), and His Ayât (proofs, evidence, verses, lessons, signs, revelations) and His Messenger (صلى الله عليه وسلم) that you were mocking?"
Make no excuse; you disbelieved after you had believed.
Those who behave as such should repent to Allah and seek His Forgiveness, in the hope that Allah may pardon them.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.