YouTube Safe Search blocks child from seeing harmful content. Safe search, or safety mode, can be programmatically enforced by setting a cookie. That approach, however, has recently stopped working if the user signed in to YouTube and disabled Safe Search. In this new case, the user's setting (presumably stored on Google's database) overrides the cookie setting. One very lousy workaround would be to block child signing in to YouTube completely.
Could I programmatically lock SafeSearch setting on? Maybe not, since according to documentation I would have to log in, and lock the setting, after which This setting will apply to all users of that browser and can only be unlocked by the same Google Account that locked it.
Logging in to YouTube (with other than the child's account) programmatically might be the difficult part.
I can't hook all the search requests (because on-site searches are HTTP POST) so that I could reliably always set the safe=active
parameter.