tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Parser.java
Date Wed, 16 Apr 2003 21:50:18 GMT
luehe       2003/04/16 14:50:18

  Modified:    jasper2/src/share/org/apache/jasper/compiler Tag:
                        tomcat_4_branch Parser.java
  Log:
  Fixed 18496: Special characters not escaped in "Unterminated ... tag" error message
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.5   +16 -15    jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Parser.java,v
  retrieving revision 1.7.2.4
  retrieving revision 1.7.2.5
  diff -u -r1.7.2.4 -r1.7.2.5
  --- Parser.java	13 Feb 2003 18:15:45 -0000	1.7.2.4
  +++ Parser.java	16 Apr 2003 21:50:15 -0000	1.7.2.5
  @@ -396,7 +396,7 @@
   	start = reader.mark();
   	Mark stop = reader.skipUntil("--%>");
   	if (stop == null) {
  -	    err.jspError(start, "jsp.error.unterminated", "<%--");
  +	    err.jspError(start, "jsp.error.unterminated", "&lt;%--");
   	}
   
   	new Node.Comment(reader.getText(start, stop), start, parent);
  @@ -409,7 +409,7 @@
   	start = reader.mark();
   	Mark stop = reader.skipUntil("%>");
   	if (stop == null) {
  -	    err.jspError(start, "jsp.error.unterminated", "<%!");
  +	    err.jspError(start, "jsp.error.unterminated", "&lt;%!");
   	}
   
   	new Node.Declaration(parseScriptText(reader.getText(start, stop)),
  @@ -423,7 +423,7 @@
   	start = reader.mark();
   	Mark stop = reader.skipUntil("%>");
   	if (stop == null) {
  -	    err.jspError(start, "jsp.error.unterminated", "<%=");
  +	    err.jspError(start, "jsp.error.unterminated", "&lt;%=");
   	}
   
   	new Node.Expression(parseScriptText(reader.getText(start, stop)),
  @@ -437,7 +437,7 @@
   	start = reader.mark();
   	Mark stop = reader.skipUntil("%>");
   	if (stop == null) {
  -	    err.jspError(start, "jsp.error.unterminated", "<%");
  +	    err.jspError(start, "jsp.error.unterminated", "&lt;%");
   	}
   
   	new Node.Scriptlet(parseScriptText(reader.getText(start, stop)),
  @@ -457,7 +457,7 @@
   
   	if (!reader.matches("/>")) {
   	    err.jspError(reader.mark(), "jsp.error.unterminated",
  -			 "<jsp:param");
  +			 "&lt;jsp:param");
   	}
   
   	new Node.ParamAction(attrs, start, parent);
  @@ -498,7 +498,7 @@
   	    
   	if (!reader.matches(">")) {
   	    err.jspError(reader.mark(), "jsp.error.unterminated",
  -			 "<jsp:include");
  +			 "&lt;jsp:include");
   	}
   
   	reader.skipSpaces();
  @@ -525,7 +525,7 @@
   
   	if (!reader.matches(">")) {
   	    err.jspError(reader.mark(), "jsp.error.unterminated",
  -			 "<jsp:forward");
  +			 "&lt;jsp:forward");
   	}
   
   	reader.skipSpaces();
  @@ -542,7 +542,7 @@
   
   	if (!reader.matches("/>")) {
   	    err.jspError(reader.mark(), "jsp.error.unterminated",
  -			 "<jsp:getProperty");
  +			 "&lt;jsp:getProperty");
   	}
   
   	new Node.GetProperty(attrs, start, parent);
  @@ -557,7 +557,7 @@
   
   	if (!reader.matches("/>")) {
   	    err.jspError(reader.mark(), "jsp.error.unterminated",
  -			 "<jsp:setProperty");
  +			 "&lt;jsp:setProperty");
   	}
   
   	new Node.SetProperty(attrs, start, parent);
  @@ -578,7 +578,7 @@
   
   	if (!reader.matches(">")) {
   	    err.jspError(reader.mark(), "jsp.error.unterminated",
  -			 "<jsp:useBean");
  +			 "&lt;jsp:useBean");
   	}
   
   	Node beanNode = new Node.UseBean(attrs, start, parent);
  @@ -813,7 +813,8 @@
   	Mark bodyStart = reader.mark();
   	Mark bodyEnd = reader.skipUntilETag(tag);
   	if (bodyEnd == null) {
  -	    err.jspError(start, "jsp.error.unterminated", "<"+tag+">");
  +	    err.jspError(start, "jsp.error.unterminated",
  +			 "&lt;" + tag + "&gt;");
   	}
   	new Node.TemplateText(reader.getText(bodyStart, bodyEnd), bodyStart,
   			      parent);
  @@ -831,7 +832,7 @@
   	    }
   	    parseElements(parent);
   	}
  -	err.jspError(start, "jsp.error.unterminated", "<"+tag+">");
  +	err.jspError(start, "jsp.error.unterminated", "&lt;" + tag + "&gt;");
       }
   
       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message