added input validation and sanitizing for mitigating RCE vulnerabilities
added XSS protection to submitted URLs
fixed url encoding error
Merge pull request #21 from opentechinstitute/fix-RCE

Added input validation and sanitizing for mitigating RCE vulnerabilities. Successfully tested by @jheretic.