ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib ChangeLogWriter.java ChangeLogParser.java
Date Thu, 04 Apr 2002 10:25:12 GMT
donaldp     02/04/04 02:25:12

  Modified:    src/main/org/apache/tools/ant/taskdefs/cvslib
                        ChangeLogWriter.java ChangeLogParser.java
  Log:
  Move CDATA escaping to the writer to make it harder to get a CDATA in another CDATA
  
  Revision  Changes    Path
  1.4       +3 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogWriter.java
  
  Index: ChangeLogWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ChangeLogWriter.java	3 Apr 2002 09:20:21 -0000	1.3
  +++ ChangeLogWriter.java	4 Apr 2002 10:25:12 -0000	1.4
  @@ -61,7 +61,7 @@
    * Class used to generate an XML changelog.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/04/03 09:20:21 $
  + * @version $Revision: 1.4 $ $Date: 2002/04/04 10:25:12 $
    */
   class ChangeLogWriter
   {
  @@ -98,7 +98,7 @@
           output.println( "\t<entry>" );
           output.println( "\t\t<date>" + c_outputDate.format( entry.getDate() ) + "</date>"
);
           output.println( "\t\t<time>" + c_outputTime.format( entry.getDate() ) + "</time>"
);
  -        output.println( "\t\t<author>" + entry.getAuthor() + "</author>" );
  +        output.println( "\t\t<author><![CDATA[" + entry.getAuthor() + "]]></author>"
);
   
           final Enumeration enumeration = entry.getFiles().elements();
           while( enumeration.hasMoreElements() )
  @@ -116,7 +116,7 @@
   
               output.println( "\t\t</file>" );
           }
  -        output.println( "\t\t<msg>" + entry.getComment() + "</msg>" );
  +        output.println( "\t\t<msg><![CDATA[" + entry.getComment() + "]]></msg>"
);
           output.println( "\t</entry>" );
       }
   }
  
  
  
  1.5       +2 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
  
  Index: ChangeLogParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ChangeLogParser.java	2 Apr 2002 08:42:44 -0000	1.4
  +++ ChangeLogParser.java	4 Apr 2002 10:25:12 -0000	1.5
  @@ -64,7 +64,7 @@
    * A class used to parse the output of the CVS log command.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.4 $ $Date: 2002/04/02 08:42:44 $
  + * @version $Revision: 1.5 $ $Date: 2002/04/04 10:25:12 $
    */
   class ChangeLogParser
   {
  @@ -162,7 +162,6 @@
               //so we can save it
               final int end = m_comment.length() - lineSeparator.length(); //was -1
               m_comment = m_comment.substring( 0, end );
  -            m_comment = "<![CDATA[" + m_comment + "]]>";
               saveEntry();
               m_status = GET_FILE;
           }
  @@ -170,7 +169,6 @@
           {
               final int end = m_comment.length() - lineSeparator.length(); //was -1
               m_comment = m_comment.substring( 0, end );
  -            m_comment = "<![CDATA[" + m_comment + "]]>";
               m_status = GET_PREVIOUS_REV;
           }
           else
  @@ -228,7 +226,7 @@
   
               if( m_userList.containsKey( m_author ) )
               {
  -                m_author = "<![CDATA[" + m_userList.getProperty( m_author ) + "]]>";
  +                m_author = m_userList.getProperty( m_author );
               }
   
               m_status = GET_COMMENT;
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message