I think addslashes should be called within the implementation of `generateString()`.