I wrote this function to intercept strings that would not make good user names due to the presence of invalid url characters. If the string contains no invalid characters, the function returns true, if it does, it either returns false or a formatted string containing all the invalid characters.