To lighten the load on our content editors, we can add middleware to the save/update routes that checks the content of the make. Before this can land, guidelines explaining why content is automatically blocked and why things are taken down must be written.
I created the algorithm to check and collect blacklisted words from a string. The problems I have is where can I implement this so that the algorithm can check entered content. I've been skimming to the JS files of MakeAPI but I'm still trying to understand how the content are saved. Can anyone help me? where can I find the variable to grab entered content so that I can place the check.
you'll want to write this as a middleware function ( https://github.com/mozilla/MakeAPI/blob/master/lib/middleware.js ) and then have it sit in the POST and PUT routes ( https://github.com/mozilla/MakeAPI/blob/master/server.js#L92-L93 ). For both, put the middleware after prefixAuth.
Can someone please explain to me which variable I can focus on to check the content of the make in https://github.com/mozilla/MakeAPI/blob/master/lib/middleware.js
(In reply to Jose Romasanta from comment #3) > Can someone please explain to me which variable I can focus on to check the > content of the make in > https://github.com/mozilla/MakeAPI/blob/master/lib/middleware.js The data that is being applied to a make will exist on req.body
unfortunately there are several issues here that make this a bit of a bottomless bit, as we don't have any guidelines right now, don't have an exhaustive list of "bad words", and we would also have to start doing this for every language we offer webmaker in, to be consistent, so given the scope of this problem we're going to close this issue for now and readdress when it becomes necessary rather than a feature concept.
I realized it's wontfix', but i had to share what Spiderman's approach is: http://i.imgur.com/UpW6vUi.gif