ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/util DOMElementWriterTest.java
Date Wed, 15 Jan 2003 14:25:12 GMT
bodewig     2003/01/15 06:25:12

  Modified:    src/main/org/apache/tools/ant/util DOMElementWriter.java
               src/testcases/org/apache/tools/ant/util
                        DOMElementWriterTest.java
  Log:
  &x should better be &#x
  
  Revision  Changes    Path
  1.14      +4 -4      jakarta-ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java
  
  Index: DOMElementWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DOMElementWriter.java	15 Jan 2003 14:02:49 -0000	1.13
  +++ DOMElementWriter.java	15 Jan 2003 14:25:12 -0000	1.14
  @@ -244,12 +244,12 @@
        *
        * <p>Also ensure that we are not including an <code>]]&gt;</code>
        * marker by replacing that sequence with
  -     * <code>&amp;x5d;&amp;x5d;&amp;gt;</code>.</p>
  +     * <code>&amp;#x5d;&amp;#x5d;&amp;gt;</code>.</p>
        *
        * <p>See XML 1.0 2.2 <a
  -     * href="http://www.w3.org/TR/1998/REC-xml-19980210#charsets">http://www.w3.org/TR/1998/REC-xml-19980210#charsets</a>.
and
  +     * href="http://www.w3.org/TR/1998/REC-xml-19980210#charsets">http://www.w3.org/TR/1998/REC-xml-19980210#charsets</a>
and
        * 2.7 <a
  -     * href="http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect">http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect</a></p>
  +     * href="http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect">http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect</a>.</p>
   
        */
       public String encodedata(final String value) {
  @@ -265,7 +265,7 @@
           int cdEnd = result.indexOf("]]>");
           while (cdEnd != -1) {
               sb.setLength(cdEnd);
  -            sb.append("&x5d;&x5d;&gt;")
  +            sb.append("&#x5d;&#x5d;&gt;")
                   .append(result.substring(cdEnd+3));
               result = sb.toString();
               cdEnd = result.indexOf("]]>");
  
  
  
  1.8       +5 -5      jakarta-ant/src/testcases/org/apache/tools/ant/util/DOMElementWriterTest.java
  
  Index: DOMElementWriterTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/util/DOMElementWriterTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DOMElementWriterTest.java	15 Jan 2003 14:02:49 -0000	1.7
  +++ DOMElementWriterTest.java	15 Jan 2003 14:25:12 -0000	1.8
  @@ -123,11 +123,11 @@
       public void testCDATAEndEncoding() {
           assertEquals("]>", w.encodedata("]>"));
           assertEquals("]]", w.encodedata("]]"));
  -        assertEquals("&x5d;&x5d;&gt;", w.encodedata("]]>"));
  -        assertEquals("&x5d;&x5d;&gt;A", w.encodedata("]]>A"));
  -        assertEquals("A&x5d;&x5d;&gt;", w.encodedata("A]]>"));
  -        assertEquals("A&x5d;&x5d;&gt;A", w.encodedata("A]]>A"));
  -        assertEquals("A&x5d;&x5d;&gt;B&x5d;&x5d;&gt;C",
  +        assertEquals("&#x5d;&#x5d;&gt;", w.encodedata("]]>"));
  +        assertEquals("&#x5d;&#x5d;&gt;A", w.encodedata("]]>A"));
  +        assertEquals("A&#x5d;&#x5d;&gt;", w.encodedata("A]]>"));
  +        assertEquals("A&#x5d;&#x5d;&gt;A", w.encodedata("A]]>A"));
  +        assertEquals("A&#x5d;&#x5d;&gt;B&#x5d;&#x5d;&gt;C",
                        w.encodedata("A]]>B]]>C"));
       }
   }
  
  
  

--
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