From 3c696f72daf822cb5a96dc522ed7f6beb5bb25de Mon Sep 17 00:00:00 2001 From: sanex3339 Date: Wed, 1 Jun 2016 10:23:50 +0300 Subject: [PATCH] dev --- dist/src/Utils.js | 2 +- src/Utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/src/Utils.js b/dist/src/Utils.js index 6831c11d..604a7b6e 100644 --- a/dist/src/Utils.js +++ b/dist/src/Utils.js @@ -42,7 +42,7 @@ class Utils { } static stringToUnicode(string) { const radix = 16, unicodeSliceValue = -4; - let regexp = new RegExp('[a-zA-Z]'); + let regexp = new RegExp('[\x00-\x7F]'); return `'${string.replace(/[\s\S]/g, (escape) => { if (regexp.test(escape)) { return '\\x' + escape.charCodeAt(0).toString(radix); diff --git a/src/Utils.ts b/src/Utils.ts index a4b364c9..8044e0e2 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -100,7 +100,7 @@ export class Utils { const radix: number = 16, unicodeSliceValue: number = -4; - let regexp: RegExp = new RegExp('[a-zA-Z]'); + let regexp: RegExp = new RegExp('[\x00-\x7F]'); return `'${string.replace(/[\s\S]/g, (escape: string): string => { if (regexp.test(escape)) {