your escapeStr(input, "'") would replace ' with \'