Check for empty tag stack, fixing bug 414
http://helma.org/bugs/show_bug.cgi?id=414
This commit is contained in:
parent
05753dc7e5
commit
21d0cffb54
1 changed files with 2 additions and 1 deletions
|
@ -714,7 +714,8 @@ public final class HtmlEncoder {
|
|||
if (str.charAt(i - 1) == '/') {
|
||||
// this is to avoid misinterpreting tags like
|
||||
// <a href=http://foo/> as empty
|
||||
if (htmlTagMode != TAG_ATT_VAL && htmlTagMode != TAG_ATT_NAME) {
|
||||
if (!openTags.empty() && htmlTagMode != TAG_ATT_VAL &&
|
||||
htmlTagMode != TAG_ATT_NAME) {
|
||||
openTags.pop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue