There must have been more code containing the function cleanString() in your previous usage of this email form.
I have done some searching and couldn't find anything relating to a function called cleanString but I did find a simple string cleaner with will remove anything that isn't ascii...