send_string_escaped should escape for urls, not html

Wed, 06 Sep 2023 22:25:34 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 06 Sep 2023 22:25:34 +0200
changeset 507
4b3ac9249394
parent 506
696246f5758f
child 508
fb1a51e7954f

send_string_escaped should escape for urls, not html

src/server/webdav/multistatus.c file | annotate | diff | comparison | revisions
--- a/src/server/webdav/multistatus.c	Mon Jul 10 18:52:28 2023 +0200
+++ b/src/server/webdav/multistatus.c	Wed Sep 06 22:25:34 2023 +0200
@@ -102,6 +102,7 @@
         char c = str.ptr[i];
         end = str.ptr + i;
         switch(c) {
+            /*
             case '"': {
                 escape = "&quot;";
                 esclen = 6;
@@ -127,6 +128,12 @@
                 esclen = 4;
                 break;
             }
+            */
+            case ' ': {
+                escape = "%20";
+                esclen = 3;
+                break;
+            }
             default: continue;
         }
         ptrdiff_t len = end - begin;

mercurial