Yeah I've seen that demonstration in school too. But if the teacher was willing to do it in school, with kids, how dangerous was it really?
That's because the starting density of the hydrogen air mixes at near atmospheric pressure (such as in a balloon) is pretty low. Also, the balloon does not significantly contain the explosion, which reduces the danger a lot. I would not want to do it in a glass container.
Things can always go wrong. We probably shouldn't strive for 100% safety because they we'd spend our lives in a padded cell. But we also shouldn't assume things are safe because they're common or routine.
I would.