Why you should be using a whitelist not a blacklist for filtering URL’s
If you are building a website and have dynamic content that needs search engine friendly URL’s automatically generated from a title this article may be of interest.
I see a lot of code that use a blacklist approach to accomplish this task, here I introduce the whitelist approach and a simple function that can convert any user provided string into a safe URL that can be used as a URL without worrying about invalid characters.