From a655c8ff5f9f16119bb49df320eb60bd6d386fa6 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Sun, 8 Aug 2010 11:21:40 -0400 Subject: Ignore XML closing tags () in case an XML generator is used to write configs --- src/configparser.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/configparser.cpp') diff --git a/src/configparser.cpp b/src/configparser.cpp index 173c81338..182451dcb 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -169,6 +169,17 @@ struct Parser nextword(name); int spc = next(); + if (spc == '/' && name.empty()) + { + // XML close tag like ""; ignore. + nextword(name); + spc = next(); + if (spc != '>') + throw CoreException("Invalid characters in XML closing tag"); + return; + } + + // Except for and , the name must be followed by a space if (spc == '>' || spc == '/') unget(spc); else if (!isspace(spc)) -- cgit v1.3.1-10-gc9f91