processGetPreviousRevision method sets the status to GET_COMMENT but it should set it to GET_DATE otherwise the date information gets put in the comment and as the author is escaped using a CDATA, you finally get a CDATA inside a CDATA... Submitted By: Frederic Lavigne <fred@castify.net> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272201 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -131,7 +131,6 @@ class ChangeLogParser | |||||
| //so we can save it | //so we can save it | ||||
| final int end = m_comment.length() - lineSeparator.length(); //was -1 | final int end = m_comment.length() - lineSeparator.length(); //was -1 | ||||
| m_comment = m_comment.substring( 0, end ); | m_comment = m_comment.substring( 0, end ); | ||||
| m_comment = "<![CDATA[" + m_comment + "]]>"; | |||||
| saveEntry(); | saveEntry(); | ||||
| m_status = GET_FILE; | m_status = GET_FILE; | ||||
| } | } | ||||
| @@ -139,7 +138,6 @@ class ChangeLogParser | |||||
| { | { | ||||
| final int end = m_comment.length() - lineSeparator.length(); //was -1 | final int end = m_comment.length() - lineSeparator.length(); //was -1 | ||||
| m_comment = m_comment.substring( 0, end ); | m_comment = m_comment.substring( 0, end ); | ||||
| m_comment = "<![CDATA[" + m_comment + "]]>"; | |||||
| m_status = GET_PREVIOUS_REV; | m_status = GET_PREVIOUS_REV; | ||||
| } | } | ||||
| else | else | ||||
| @@ -197,7 +195,7 @@ class ChangeLogParser | |||||
| if( m_userList.containsKey( m_author ) ) | 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; | m_status = GET_COMMENT; | ||||
| @@ -226,7 +224,7 @@ class ChangeLogParser | |||||
| saveEntry(); | saveEntry(); | ||||
| m_revision = m_previousRevision; | m_revision = m_previousRevision; | ||||
| m_status = GET_COMMENT; | |||||
| m_status = GET_DATE; | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -51,7 +51,7 @@ class ChangeLogWriter | |||||
| output.println( "\t<entry>" ); | output.println( "\t<entry>" ); | ||||
| output.println( "\t\t<date>" + c_outputDate.format( entry.getDate() ) + "</date>" ); | 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<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 Iterator iterator = entry.getFiles().iterator(); | final Iterator iterator = entry.getFiles().iterator(); | ||||
| while( iterator.hasNext() ) | while( iterator.hasNext() ) | ||||
| @@ -69,7 +69,7 @@ class ChangeLogWriter | |||||
| output.println( "\t\t</file>" ); | 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>" ); | output.println( "\t</entry>" ); | ||||
| } | } | ||||
| } | } | ||||
| @@ -253,7 +253,7 @@ class ChangeLogParser | |||||
| saveEntry(); | saveEntry(); | ||||
| m_revision = m_previousRevision; | m_revision = m_previousRevision; | ||||
| m_status = GET_COMMENT; | |||||
| m_status = GET_DATE; | |||||
| } | } | ||||
| /** | /** | ||||