Properly escape single quotes