diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-10-26 13:29:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-10-26 13:29:53 +0100 |
commit | 033e0961e686f6ec9dc4a5cef9f9cfe3fa69a207 (patch) | |
tree | dfb6ba7f13089dc4ca6db9955601bb5b706401f6 /src | |
parent | fa09e693be45f06c8d3d309459b3e37620296641 (diff) | |
download | rspamd-033e0961e686f6ec9dc4a5cef9f9cfe3fa69a207.tar.gz rspamd-033e0961e686f6ec9dc4a5cef9f9cfe3fa69a207.zip |
Skip empty text values.
Diffstat (limited to 'src')
-rw-r--r-- | src/cfg_xml.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c index 2757fded2..f0ed5309d 100644 --- a/src/cfg_xml.c +++ b/src/cfg_xml.c @@ -1270,6 +1270,15 @@ rspamd_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len struct rspamd_xml_userdata *ud = user_data; ucl_object_t *top; + while (text_len > 0 && g_ascii_isspace (*text)) { + text_len --; + text ++; + } + + if (text_len == 0) { + return; + } + top = ud->parent_pointer[ud->nested - 1]; ucl_object_insert_key (top, ucl_object_fromstring_common (text, text_len, UCL_STRING_PARSE), ud->section_name[ud->nested], 0, true); |