[libxml2] Fix broken escape behaviour in regexp ranges



commit 9543aee99b39f4de58641a66a5747cadd279d0b0
Author: Daniel Veillard <veillard redhat com>
Date:   Mon Mar 15 11:13:39 2010 +0100

    Fix broken escape behaviour in regexp ranges

 xmlregexp.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/xmlregexp.c b/xmlregexp.c
index 2a501ad..aaff33e 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -4892,6 +4892,17 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
 		}
 	    }
 	} else if (ctxt->atom->type == XML_REGEXP_RANGES) {
+            switch (cur) {
+                case 'n':
+                    cur = '\n';
+                    break;
+                case 'r':
+                    cur = '\r';
+                    break;
+                case 't':
+                    cur = '\t';
+                    break;
+            }
 	    xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
 			       XML_REGEXP_CHARVAL, cur, cur, NULL);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]