Improve encryption to escape and ignore spaces