From a0beacdf4c03412b5d3261d115e3c7268ec0c50e Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 13 Jan 2003 11:09:38 +0000 Subject: [PATCH] Do not enter into Helma macro tags or HTML comment tags if we are within a HTML tag (bug 200, http://helma.org/bugs/show_bug.cgi?id=200 ) --- src/helma/util/HtmlEncoder.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/helma/util/HtmlEncoder.java b/src/helma/util/HtmlEncoder.java index 14916d41..bc278e9b 100644 --- a/src/helma/util/HtmlEncoder.java +++ b/src/helma/util/HtmlEncoder.java @@ -363,11 +363,14 @@ public final class HtmlEncoder { if (i < l-2) { if (!insideMacroTag && '%' == str.charAt(i+1)) { // this is the beginning of a Helma macro tag - insideMacroTag = insideTag = true; - macroQuoteChar = '\u0000'; + if (!insideCodeTag) { + insideMacroTag = insideTag = true; + macroQuoteChar = '\u0000'; + } } else if ('!' == str.charAt(i+1) && '-' == str.charAt(i+2)) { // the beginning of an HTML comment? - insideComment = insideTag = (i