Well it has mains floating 100V without even a fuse powering a couple of ICs to begin with.What looks dangerous about it?
SgtWookie already indicated that the 10K resistive pull-up is too weak and suggested a totem-pole driver stage. If this is incorporated, I believe that it is a viable candidate. There may also be a few other nuances that need to be cleaned up. The 78S40 driver is a great chip--I have used it in numerous applications.
Your whole circuit floats at mains potential when you do stuff like this.
Last edited: