Not sure how you are supposed to use encString, but it's a lot easier to use, if ok_url checks for the the characters that need to be encoded, not the ones that are allowed. That is '%' needs to be encoded, but is allowed in the encoded string as it is the result of encoding process.
Not sure how you are supposed to use encString, but it's a lot easier to use, if ok_url checks for the the characters that need to be encoded, not the ones that are allowed. That is '%' needs to be encoded, but is allowed in the encoded string as it is the result of encoding process.