From e03cd427355ccf717578d52fd017bd846986cd0a Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 5 Oct 2014 09:57:25 +0200 Subject: [PATCH] Stricter lexing rules for XPath wildcards. --- lib/oga/xpath/lexer.rl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oga/xpath/lexer.rl b/lib/oga/xpath/lexer.rl index b2a1019..bddf229 100644 --- a/lib/oga/xpath/lexer.rl +++ b/lib/oga/xpath/lexer.rl @@ -194,7 +194,7 @@ module Oga # Identifiers are used for element names, namespaces, attribute names, # etc. Identifiers have to start with a letter. - identifier = [a-zA-Z*]+ [a-zA-Z\-_0-9]*; + identifier = '*' | [a-zA-Z*]+ [a-zA-Z\-_0-9]*; action emit_identifier { emit(:T_IDENT, ts, te)