Skip to content
Browse files

Prevent ArrayIndexOutOfBoundsException when the BlockExtractingRule e…

…ncounters two closing tags in a row.
  • Loading branch information...
1 parent 4e416c2 commit bf361ec1a0c93d103cb822acbbdb7efc5243f681 @carlfish carlfish committed
View
1 src/java/com/opensymphony/module/sitemesh/html/BlockExtractingRule.java
@@ -35,6 +35,7 @@ public void process(Tag tag) {
if (!keepInBuffer) {
context.currentBuffer().endDelete(tag.getPosition() + tag.getLength());
}
+ seenOpeningTag = false;
} else if (!keepInBuffer) {
context.currentBuffer().delete(tag.getPosition(), tag.getLength());
}
View
24 src/parser-tests/test45.txt
@@ -0,0 +1,24 @@
+~~~ INPUT ~~~
+
+<head>
+ <meta name=author content=Someone>
+</head>
+ <title>Support</title>
+</head>
+
+~~~ TITLE ~~~
+
+Support
+
+~~~ PROPERTIES ~~~
+
+meta.author=Someone
+title=Support
+
+~~~ HEAD ~~~
+
+ <meta name=author content=Someone>
+
+~~~ BODY ~~~
+
+

0 comments on commit bf361ec

Please sign in to comment.
Something went wrong with that request. Please try again.