Sanitising text parameter to cater for the case where it contains single quotes