Commit 8fa73247 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

strings: add missing support for hexadecimal XML chracter encoding

(cherry picked from commit 3eee999c45a150aede6233e7bbd7064949c84012)
parent 330c495a
......@@ -202,9 +202,15 @@ void resolve_xml_special_chars( char *psz_value )
if( *psz_value == '&' )
{
if( psz_value[1] == '#' )
{ /* &#xxx; Unicode code point */
{ /* &#DDD; or &#xHHHH; Unicode code point */
char *psz_end;
unsigned long cp = strtoul( psz_value+2, &psz_end, 10 );
unsigned long cp;
if( psz_value[2] == 'x' ) /* The x must be lower-case. */
cp = strtoul( psz_value + 3, &psz_end, 16 );
else
cp = strtoul( psz_value + 2, &psz_end, 10 );
if( *psz_end == ';' )
{
psz_value = psz_end + 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment