[commit] r3840 - freeswitch/branches/knhor/trunk/libs/libdingaling/src
Author: knhor Date: Wed Dec 27 01:12:20 2006 New Revision: 3840 Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c Log: define STRIP_HTML_TAGS if you want to always strip html tags from the msg body Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c ============================================================================== --- freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c (original) +++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c Wed Dec 27 01:12:20 2006 @@ -1649,6 +1649,8 @@ } +/* define this if you want to always strip html tags from the msg body */ +/* #define STRIP_HTML_TAGS */ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, char *subject, char *body) { iks *msg; @@ -1658,7 +1660,8 @@ int len = 0; assert(handle != NULL); assert(body != NULL); - + +#ifdef STRIP_HTML_TAGS if (strchr(body, '<')) { len = (int) strlen(body); if (!(bdup = malloc(len))) { @@ -1682,6 +1685,7 @@ } body = bdup; } +#endif msg = iks_make_msg(IKS_TYPE_NONE, to, body); iks_insert_attrib(msg, "type", "chat");
participants (1)
-
Freeswitch SVN