Was that in a religious school? I'd see it as a good learning opportunity and of course would not oppose the detention.
There's a meme about a child who has a detention for continually pointing out that the teacher was telling the class something factually inaccurate. While it probably never happened, I enjoy wondering how I'd deal with that one.
No, just a normal state school. And he wasn't even being blasphemous. He was actually overheard, trying to comfort a girl in his class who was upset about something IRRC. Ah now I remember. This is what happened (this was 7 years ago). He was ordered into detention for saying the words "Jesus Christ!" The context was an RE lesson about ethics, where the kids were being asked to recount a bad experience they had in life. One of the girls was telling the kids about the time she nearly died in hospital. Son 4 was shocked and the JC words popped out. Then the teacher launched into a diatribe about him being the spawn of satan, etc etc. I forget what she said but it was offensive and really unprofessional. He was actually showing empathy and kindness to another child... I mean, he should have said "Eff me" if she found "Jesus Christ!" so offensive, he might as well have. (The girl he was speaking to was his mate, not remotely christian, nor was anyone else, so far as he knew, btw).
He was told to go to a detention but I refused to let him. School had to live with it, tough titty. (Ex teacher so I don't take any BS - she sounded young and inexperienced, one of those ineffectual teachers who comes down hard and randomly on an innocent kid pour encourage les autres - always a rubbish technique - and the kids thought she was crap - they're not often wrong). I just rode it out and the school backed down.
Yes, learning experience indeed. An RE teacher tried to teach him that you mustn't be nice to other kids, or try to support them lol. He came home, told me about it and I said "You're not going" (I'd forgotten that) and he said something like "That's OK mum because I wasn't planning on going".
I remember now. There was a Parent's Evening coming up very shortly after and I said if they tried to make him do detention for simply saying Jesus Christ, they could by all means try but I would be there at Parent's Evening, and would tear the RE teacher a new one... They backed down. I spoke to the year Head who had a quiet word.
He was my 4th kid at that school and they'd known me years lol. This was a supply. I'd worked a few years as a long term supply myself so know the ropes of that job. I was friendly with one of the subject Heads there, (who left) and she told me a fair bit about what had gone on behind the scenes - although not a church school, coincidentally at one point (years before this) it had a vicar as Head teacher and he wouldn't have been remotely bothered by this, either.
For context, that school was around the stage it had gone into or was about to go into Special Measures, so they were having all sorts of problems. No need for it - started off as a good school in a nice area, none of the social problems many schools contend with - they had appalling staff apart from a couple of the old guard who'd been there since Son 1 was there. Staff were leaving in droves, because the Heads were so bad.
ETA: Just found an old post I made about it elsewhere at the time. Apparently, the teacher called my son "appalling". She used that word to his face, aloud and in front of the entire class. He's no shrinking violet so he asked his classmates “Well did I offend any of you? If I did, I apologise.” The other kids - in front of this teacher - all told my kid they weren't offended by it. I told him later, just to never speak again in her class, not to her, not to answer questions etc.
He's an adult now and not a criminal (although he remains a Blasphemer). He is training to be a journalist though, so maybe it was a portent of things to come....