[xml] xmlEncodeSpecialChars(): suspicious '\r'->" " conversion

xmlEncodeSpecialChars(), file entities.c, lines 703-708:

As I can see, '\r' (CR, 0x0d, 10) encoded as "".
But dec 31 (0x1f) is "Unit Separator" (US) character.

Now question: whether there is typo?
May be character '\037' should be used instead of '\r' in the line
#703 if US was wanted

old line #703:
        } else if (*cur == '\r') {
new line:
        } else if (*cur == '\037') {

Or, if CR ('\r') was wanted, then it should be encoded as "
instead of ""...

Andrew W. Nosenko <andrew w nosenko gmail com>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]