Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Files at this revision

API Documentation at this revision

Comitter:
andrewboyson
Date:
Tue Jun 02 08:32:21 2020 +0000
Parent:
136:be1d42268b5d
Child:
138:44d84506b2f6
Commit message:
Found that an ajax input would nor send a '%' so modified encoding to convert '%' to '%25'. '+'s were already encoded to %2B.

Changed in this revision

common/web-ajax-class.inc Show annotated file Show diff for this revision Revisions of this file
common/web-ajax-class.js Show annotated file Show diff for this revision Revisions of this file
--- a/common/web-ajax-class.inc	Thu Apr 02 19:10:57 2020 +0000
+++ b/common/web-ajax-class.inc	Tue Jun 02 08:32:21 2020 +0000
@@ -89,6 +89,7 @@
 "    ajaxXhr_.onreadystatechange = ajaxHandleAjaxResponse_;\n"
 "    if (request)\n"
 "    {\n"
+"        request = request.split('%').join('%25');\n"
 "        request = request.split('+').join('%2B');\n"
 "        ajaxXhr_.open('GET', ajaxServer_ + '?' + request, true);\n"
 "    }\n"
--- a/common/web-ajax-class.js	Thu Apr 02 19:10:57 2020 +0000
+++ b/common/web-ajax-class.js	Tue Jun 02 08:32:21 2020 +0000
@@ -89,6 +89,7 @@
     ajaxXhr_.onreadystatechange = ajaxHandleAjaxResponse_;
     if (request)
     {
+        request = request.split('%').join('%25'); //Encode '%'s first
         request = request.split('+').join('%2B');
         ajaxXhr_.open('GET', ajaxServer_ + '?' + request, true);
     }