I don't agree with what happened to him, and I hope he's ok, but that's the risk you take when you decide to protest in a foreign country. You're subjected to their laws and can't just tell them to "call the consulate" and expect everything to be fine...
It's nobody's fault that both Israelis and Palestinians have taken on this militant, overzealous mindset, but it's just stupid to see it come to something like this.