f33ba3
diff --git a/server/util.c b/server/util.c
f33ba3
index 4eac462..7373fec 100644
f33ba3
--- a/server/util.c
f33ba3
+++ b/server/util.c
f33ba3
@@ -2317,13 +2317,12 @@ AP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring)
f33ba3
      * in front of every " that doesn't already have one.
f33ba3
      */
f33ba3
     while (*inchr != '\0') {
f33ba3
-        if ((*inchr == '\\') && (inchr[1] != '\0')) {
f33ba3
-            *outchr++ = *inchr++;
f33ba3
-            *outchr++ = *inchr++;
f33ba3
-        }
f33ba3
         if (*inchr == '"') {
f33ba3
             *outchr++ = '\\';
f33ba3
         }
f33ba3
+        if ((*inchr == '\\') && (inchr[1] != '\0')) {
f33ba3
+            *outchr++ = *inchr++;
f33ba3
+        }
f33ba3
         if (*inchr != '\0') {
f33ba3
             *outchr++ = *inchr++;
f33ba3
         }