diff --git a/mxml.c b/mxml.c index 509bdee..81d7590 100755 --- a/mxml.c +++ b/mxml.c @@ -286,22 +286,25 @@ void mxml_decode(char *str) *(p++) = '<'; strcpy(p, p+3); } - if (strncmp(p, ">", 4) == 0) { + else if (strncmp(p, ">", 4) == 0) { *(p++) = '>'; strcpy(p, p+3); } - if (strncmp(p, "&", 5) == 0) { + else if (strncmp(p, "&", 5) == 0) { *(p++) = '&'; strcpy(p, p+4); } - if (strncmp(p, """, 6) == 0) { + else if (strncmp(p, """, 6) == 0) { *(p++) = '\"'; strcpy(p, p+5); } - if (strncmp(p, "'", 6) == 0) { + else if (strncmp(p, "'", 6) == 0) { *(p++) = '\''; strcpy(p, p+5); } + else { + p++; // skip unknown entity + } } /* if (str[0] == '\"' && str[strlen(str)-1] == '\"') { strcpy(str, str+1);