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