Changeset 1307

Show
Ignore:
Timestamp:
09/09/06 13:14:08 (2 years ago)
Author:
cstender
Message:

don't add empty body element to xmldoc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/kdepim/src/knotes.cpp

    r996 r1307  
    163163        osxml_node_set(sum, "Summary", utf8str, enc); 
    164164 
    165         xmlNode *body = xmlNewChild(root, NULL, (const xmlChar*)"", NULL); 
    166165        utf8str = strip_html(kn_iface->text(i.key())).utf8(); 
    167166        hash += utf8str; 
    168         osxml_node_set(body, "Body", utf8str, enc); 
     167        if (utf8str && !utf8str.isEmpty()) { 
     168                xmlNode *body = xmlNewChild(root, NULL, (const xmlChar*)"", NULL); 
     169                osxml_node_set(body, "Body", utf8str, enc); 
     170        } 
    169171                 
    170172        // initialize the change object