mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffprobe: do not escape '"' between single quotes.
This commit is contained in:
parent
c1abfcd7d6
commit
d079d1d368
@ -642,15 +642,15 @@ static const char *csv_escape_str(AVBPrint *dst, const char *src, const char sep
|
|||||||
int needs_quoting = !!src[strcspn(src, meta_chars)];
|
int needs_quoting = !!src[strcspn(src, meta_chars)];
|
||||||
|
|
||||||
if (needs_quoting)
|
if (needs_quoting)
|
||||||
av_bprint_chars(dst, '\"', 1);
|
av_bprint_chars(dst, '"', 1);
|
||||||
|
|
||||||
for (; *src; src++) {
|
for (; *src; src++) {
|
||||||
if (*src == '"')
|
if (*src == '"')
|
||||||
av_bprint_chars(dst, '\"', 1);
|
av_bprint_chars(dst, '"', 1);
|
||||||
av_bprint_chars(dst, *src, 1);
|
av_bprint_chars(dst, *src, 1);
|
||||||
}
|
}
|
||||||
if (needs_quoting)
|
if (needs_quoting)
|
||||||
av_bprint_chars(dst, '\"', 1);
|
av_bprint_chars(dst, '"', 1);
|
||||||
return dst->str;
|
return dst->str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1254,7 +1254,7 @@ static const char *xml_escape_str(AVBPrint *dst, const char *src, void *log_ctx)
|
|||||||
case '&' : av_bprintf(dst, "%s", "&"); break;
|
case '&' : av_bprintf(dst, "%s", "&"); break;
|
||||||
case '<' : av_bprintf(dst, "%s", "<"); break;
|
case '<' : av_bprintf(dst, "%s", "<"); break;
|
||||||
case '>' : av_bprintf(dst, "%s", ">"); break;
|
case '>' : av_bprintf(dst, "%s", ">"); break;
|
||||||
case '\"': av_bprintf(dst, "%s", """); break;
|
case '"' : av_bprintf(dst, "%s", """); break;
|
||||||
case '\'': av_bprintf(dst, "%s", "'"); break;
|
case '\'': av_bprintf(dst, "%s", "'"); break;
|
||||||
default: av_bprint_chars(dst, *p, 1);
|
default: av_bprint_chars(dst, *p, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user