I open-sourced this package designed to protect against security risks implied by sending HTTP requests to URLs constructed from user input.
I kept running into this kind of problem in my career but couldn't find a package that addressed it already, so here it is!
Security is hard, the more people's eyes we get on a piece of code the safer we can make it. Check it out, and let me know if you think things could be improved!