It may not be legal, but it is ALWAYS ok to punch a Nazi in the face.
.
I might not do so, but I also would not intervene to stop it.
.
To the best of my knowledge Hebdo cartoons did not advocate for the removal of Muslims from France.  Big difference