summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yxml.c2
-rw-r--r--yxml.c.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/yxml.c b/yxml.c
index d2b94ff..54babab 100644
--- a/yxml.c
+++ b/yxml.c
@@ -93,7 +93,7 @@ typedef enum {
#define yxml_isHex(c) (yxml_isNum(c) || (c|32)-'a' < 6)
#define yxml_isEncName(c) (yxml_isAlpha(c) || yxml_isNum(c) || c == '.' || c == '_' || c == '-')
#define yxml_isCommentStart(c) (yxml_isChar(c) && c != '-')
-#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':')
+#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_')
#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
/* XXX: The valid characters are dependent on the quote char, hence the access to x->quote */
#define yxml_isAttValue(c) (yxml_isChar(c) && c != x->quote && c != '<' && c != '&')
diff --git a/yxml.c.in b/yxml.c.in
index 7d20bac..40a4dca 100644
--- a/yxml.c.in
+++ b/yxml.c.in
@@ -36,7 +36,7 @@ typedef enum {
#define yxml_isHex(c) (yxml_isNum(c) || (c|32)-'a' < 6)
#define yxml_isEncName(c) (yxml_isAlpha(c) || yxml_isNum(c) || c == '.' || c == '_' || c == '-')
#define yxml_isCommentStart(c) (yxml_isChar(c) && c != '-')
-#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':')
+#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_')
#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
/* XXX: The valid characters are dependent on the quote char, hence the access to x->quote */
#define yxml_isAttValue(c) (yxml_isChar(c) && c != x->quote && c != '<' && c != '&')