Do not enter into Helma macro tags or HTML comment tags if we are within a

HTML <code> tag (bug 200, http://helma.org/bugs/show_bug.cgi?id=200 )
This commit is contained in:
hns 2003-01-13 11:09:38 +00:00
parent 19d4126b51
commit a0beacdf4c

View file

@ -363,10 +363,13 @@ public final class HtmlEncoder {
if (i < l-2) {
if (!insideMacroTag && '%' == str.charAt(i+1)) {
// this is the beginning of a Helma macro tag
if (!insideCodeTag) {
insideMacroTag = insideTag = true;
macroQuoteChar = '\u0000';
}
} else if ('!' == str.charAt(i+1) && '-' == str.charAt(i+2)) {
// the beginning of an HTML comment?
if (!insideCodeTag)
insideComment = insideTag = (i<l-3 && '-' == str.charAt(i+3));
} else if (!insideTag) {
// check if this is a HTML tag.