aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/xml_lexer.mll
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-07-28 15:10:35 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-07-28 15:11:03 +0200
commite706bbd36237abc6c63d3e30cdaf9a42ac458215 (patch)
tree3ad1c1161fd9e09fee79575218689af5767f56f7 /lib/xml_lexer.mll
parent01248339f4f18cc1635b591447d343a1b4565a80 (diff)
Fixing bug #4281: Better escaping of XML attributes.
Diffstat (limited to 'lib/xml_lexer.mll')
-rw-r--r--lib/xml_lexer.mll10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/xml_lexer.mll b/lib/xml_lexer.mll
index a33be9da7..f6943dd13 100644
--- a/lib/xml_lexer.mll
+++ b/lib/xml_lexer.mll
@@ -281,6 +281,11 @@ and dq_string = parse
Buffer.add_char tmp (lexeme_char lexbuf 1);
dq_string lexbuf
}
+ | '&'
+ {
+ Buffer.add_string tmp (entity lexbuf);
+ dq_string lexbuf
+ }
| eof
{ raise (Error EUnterminatedString) }
| _
@@ -297,6 +302,11 @@ and q_string = parse
Buffer.add_char tmp (lexeme_char lexbuf 1);
q_string lexbuf
}
+ | '&'
+ {
+ Buffer.add_string tmp (entity lexbuf);
+ q_string lexbuf
+ }
| eof
{ raise (Error EUnterminatedString) }
| _