Understanding LED driver circuit AC to DC conversion
The circuit is safe so long as you can't touch it or any circuit connected to it, if there is inadequate protection between users and the circuit it is unsafe. 

R1 bleeds the charge out of the capacitor when the circuit is unplugged 
this makes the plug pins safe to touch very soon after it is unplugged.