diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index ef6083d2b..f954fae40 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -131,7 +131,7 @@ const char HTTP_SCRIPT_CONSOL[] PROGMEM = "x.onreadystatechange=function(){" "if(x.readyState==4&&x.status==200){" "var z,d;" - "d=x.responseText.split(/\1/);" + "d=x.responseText.split(/\1/);" // Field separator "id=d.shift();" "if(d.shift()==0){t.value='';}" "z=d.shift();" @@ -149,10 +149,13 @@ const char HTTP_SCRIPT_CONSOL[] PROGMEM = "window.onload=l;" ""; +const char HTTP_MODULE_TEMPLATE_REPLACE[] PROGMEM = + "\2%d'>%s (%d\3"; // \2 and \3 are used in below os.replace + const char HTTP_SCRIPT_MODULE_TEMPLATE[] PROGMEM = "var os;" "function sk(s,g){" // s = value, g = id and name - "var o=os.replace(/}1/g,\"