Przeglądaj źródła

Different escaping. No unescape called. Escapes into UTF-8 range (only escape 0x00-0x1f, double quote and backslash, and 0x7f-0x9f, the rest is left unchanged).

Herbert Vojčík 12 lat temu
rodzic
commit
c6b3e3ba6a
3 zmienionych plików z 431 dodań i 429 usunięć
  1. 220 219
      js/Kernel-Collections.deploy.js
  2. 210 209
      js/Kernel-Collections.js
  3. 1 1
      st/Kernel-Collections.st

Plik diff jest za duży
+ 220 - 219
js/Kernel-Collections.deploy.js


Plik diff jest za duży
+ 210 - 209
js/Kernel-Collections.js


+ 1 - 1
st/Kernel-Collections.st

@@ -976,7 +976,7 @@ asJavaScriptSelector
 asJavascript
 	<
 		if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
-			return "unescape(\"" + escape(self) + "\")";
+			return "\"" + self.replace(/[\x00-\x1f"\\\x7f-\x9f]/g, function(ch){var c=ch.charCodeAt(0);return "\\x"+("0"+c.toString(16)).slice(-2)}) + "\"";
 		else
 			return "\"" + self + "\"";
 	>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików