Updated the sanitisation function to the new (sanitizeData)