Browse code

ffprobe: do not escape '"' between single quotes.

Clément Bœsch authored on 2013/01/01 21:30:42
Showing 1 changed files
... ...
@@ -642,15 +642,15 @@ static const char *csv_escape_str(AVBPrint *dst, const char *src, const char sep
642 642
     int needs_quoting = !!src[strcspn(src, meta_chars)];
643 643
 
644 644
     if (needs_quoting)
645
-        av_bprint_chars(dst, '\"', 1);
645
+        av_bprint_chars(dst, '"', 1);
646 646
 
647 647
     for (; *src; src++) {
648 648
         if (*src == '"')
649
-            av_bprint_chars(dst, '\"', 1);
649
+            av_bprint_chars(dst, '"', 1);
650 650
         av_bprint_chars(dst, *src, 1);
651 651
     }
652 652
     if (needs_quoting)
653
-        av_bprint_chars(dst, '\"', 1);
653
+        av_bprint_chars(dst, '"', 1);
654 654
     return dst->str;
655 655
 }
656 656
 
... ...
@@ -1254,7 +1254,7 @@ static const char *xml_escape_str(AVBPrint *dst, const char *src, void *log_ctx)
1254 1254
         case '&' : av_bprintf(dst, "%s", "&");  break;
1255 1255
         case '<' : av_bprintf(dst, "%s", "&lt;");   break;
1256 1256
         case '>' : av_bprintf(dst, "%s", "&gt;");   break;
1257
-        case '\"': av_bprintf(dst, "%s", "&quot;"); break;
1257
+        case '"' : av_bprintf(dst, "%s", "&quot;"); break;
1258 1258
         case '\'': av_bprintf(dst, "%s", "&apos;"); break;
1259 1259
         default: av_bprint_chars(dst, *p, 1);
1260 1260
         }