Commit 7fc712ae authored by Guillaume Melquiond's avatar Guillaume Melquiond
Browse files

Add partial support for XML numeric entities.

parent bd9e99e3
......@@ -170,6 +170,13 @@ and string_val = parse
| "&"
{ Buffer.add_char buf '&';
string_val lexbuf }
| "&#" (digit+ as n) ';'
{ let n = try int_of_string n with _ -> 256 in
if n >= 128 then parse_error "unrecognized entity";
Buffer.add_char buf (Char.chr n);
string_val lexbuf }
| '&'
{ parse_error "unrecognized entity" }
| [^ '"'] as c
{ Buffer.add_char buf c;
string_val lexbuf }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment