Completed #73363 fixup, Daniel
authorDaniel Veillard <veillard@src.gnome.org>
Mon, 4 Mar 2002 12:04:12 +0000 (12:04 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Mon, 4 Mar 2002 12:04:12 +0000 (12:04 +0000)
libxslt/pattern.c

index 4e6d0b7..86551cf 100644 (file)
@@ -1442,15 +1442,22 @@ parse_predicate:
        level++;
        NEXT;
        q = CUR_PTR;
-       /* TODO: avoid breaking in strings ... */
        while (CUR != 0) {
            /* Skip over nested predicates */
            if (CUR == '[')
                level++;
-           if (CUR == ']') {
+           else if (CUR == ']') {
                level--;
                if (level == 0)
                    break;
+           } else if (CUR == '"') {
+               NEXT;
+               while ((CUR != 0) && (CUR != '"'))
+                   NEXT;
+           } else if (CUR == '\'') {
+               NEXT;
+               while ((CUR != 0) && (CUR != '\''))
+                   NEXT;
            }
            NEXT;
        }