Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
There is a consensus among the scholars that insulting the religion is synonymous to disbelief in Allah, the Exalted. The most serious of insulting religion is insulting Allah, then insulting the personality of the Prophet (Sallallahu Alaihi wa Sallam), then insulting anything from Islamic jurisprudence. All these insults are very serious and very grave.
If a Muslim commits one of the above he apostates from Islam, we seek refuge in Allah from that. The evidence about this is the Saying of Allah: {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, evidences, verses, lessons, signs, revelations, etc.) and His Messenger (SAW) that you were mocking?" Make no excuse; you have disbelieved after you had believed…..}[9:65-66].
This verse was revealed about people who did not openly insult the religion, but they insulted the bearers and transmitters of this religion, they said: ‘We have never seen such reciters, they are the most greedy of people, the worst liars, and the most cowardly when meeting (the enemy). What about someone who dared insulting Allah?!
As regards the relation of a person who apostates from religion in relation to his spouse, the Fuqaha (Islamic Jurisprudents) agreed that if a spouse apostates from religion then they have to be separated he/she should not stay in seclusion with the other partner, and no intercourse should take place between them. However, they differed whether by this they are considered divorced or not, and whether there must be a new marriage contract between them after his/her repentance or not.
The Shafi’e school of thought and those of their opinion hold the view that they do not need a new contract after his/her repentance before the end of the waiting period (that a woman should observe before getting married again).
Therefore, according to this opinion which we consider as the preponderant one, if your husband repents from whatever he might have done or said, before the end of your waiting period, then he is still your husband and no new marriage contract is needed.