From cac150b64b33e7b88d350859778f6a48c3175184 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Tue, 13 Nov 2007 21:32:13 -0500 Subject: [PATCH] Fixed creating new account names will invalid characters in the name. --- src/xml.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/xml.c b/src/xml.c index 62065c47..8b977abe 100644 --- a/src/xml.c +++ b/src/xml.c @@ -112,16 +112,15 @@ gpg_error_t new_account(xmlDocPtr doc, gchar *name) if (!p || !root) return EPWMD_LIBXML_ERROR; - if (is_literal_element_str(p)) { + if (is_literal_element_str(p)) p++; - /* - * Event though the account name is an attribute and not an element, - * element syntax still applies. - */ - if (valid_xml_element((xmlChar *)p) == FALSE) - return EPWMD_INVALID_ELEMENT; - } + /* + * Event though the account name is an attribute and not an element, + * element syntax still applies. + */ + if (valid_xml_element((xmlChar *)p) == FALSE) + return EPWMD_INVALID_ELEMENT; n = xmlNewNode(NULL, (xmlChar *)"account"); n = xmlAddChild(root, n); -- 2.11.4.GIT