This commit is contained in:
sanex3339
2016-06-01 10:23:50 +03:00
parent e2467b6003
commit 3c696f72da
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);