Add single and double quotes to escaped characters in XML output
We already escape '<', '>', and '&'. This adds the remaining two special entities in XML: '\'' and '\"'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b693bb3fb9
commit
162b69828a
@ -97,6 +97,12 @@ static void quote(FILE *f, const char *text)
|
||||
case '&':
|
||||
escape = "&";
|
||||
break;
|
||||
case '\'':
|
||||
escape = "'";
|
||||
break;
|
||||
case '\"':
|
||||
escape = """;
|
||||
break;
|
||||
}
|
||||
fwrite(text, (p - text - 1), 1, f);
|
||||
if (!escape)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user