[Kimchi-devel] [WOK][PATCH] Added method to validate ASCII value

Aline Manera alinefm at linux.vnet.ibm.com
Wed Apr 13 16:30:08 UTC 2016


I was not able to apply this patch.

Could you rebase it on top of master branch and resend?

Thanks,
Aline Manera

On 04/13/2016 08:04 AM, pkulkark at linux.vnet.ibm.com wrote:
> From: Pooja Kulkarni <pkulkark at linux.vnet.ibm.com>
>
> Added a method to utils to check
> if a given field value is ASCII
>
> Signed-off-by: Pooja Kulkarni <pkulkark at linux.vnet.ibm.com>
> ---
>   ui/js/src/wok.utils.js | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/ui/js/src/wok.utils.js b/ui/js/src/wok.utils.js
> index e5701e6..d7dd8a3 100644
> --- a/ui/js/src/wok.utils.js
> +++ b/ui/js/src/wok.utils.js
> @@ -193,3 +193,7 @@ wok.urlSafeB64Decode = function(str) {
>   wok.urlSafeB64Encode = function(str) {
>       return $.base64.btoa(str, true).replace(/\+/g, '-').replace(/\//g, '_');
>   }
> +
> +wok.isASCII = function(field) {
> +    return /^[\x00-\x7F]*$/.test(field);
> +}




More information about the Kimchi-devel mailing list