rss feeds of your voicemail

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6417 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-11-28 19:56:25 +00:00
parent 86b0bde562
commit 60c783c636
12 changed files with 639 additions and 42 deletions
+14 -2
View File
@@ -1457,7 +1457,8 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_open_cfg(const char *file_path, switch_x
static char *switch_xml_ampencode(const char *s, switch_size_t len, char **dst, switch_size_t *dlen, switch_size_t *max, short a)
{
const char *e = NULL;
int immune = 0;
if (len) {
e = s + len;
}
@@ -1466,13 +1467,24 @@ static char *switch_xml_ampencode(const char *s, switch_size_t len, char **dst,
while (*dlen + 10 > *max)
*dst = (char *)realloc(*dst, *max += SWITCH_XML_BUFSIZE);
switch (*s) {
if (immune) {
if (*s == '\0') {
return *dst;
}
(*dst)[(*dlen)++] = *s;
} else
switch (*s) {
case '\0':
return *dst;
case '&':
*dlen += sprintf(*dst + *dlen, "&");
break;
case '<':
if (*(s+1) == '!') {
(*dst)[(*dlen)++] = *s;
immune++;
break;
}
*dlen += sprintf(*dst + *dlen, "&lt;");
break;
case '>':