I don't think this is going to work... You need to take the string the sanitize as argument, no?

Please add a test-case to illustrate the use-case and make sure it actually works.