Author: vsiveton
Date: Tue May 19 12:36:02 2009
New Revision: 776294

URL: http://svn.apache.org/viewvc?rev=776294&view=rev
Log:
o refactor unescapeHtml to unescapeHTML for consistency reason

Modified:
    
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
    
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java
    
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java
    
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java

Modified: 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=776294&r1=776293&r2=776294&view=diff
==============================================================================
--- 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
 Tue May 19 12:36:02 2009
@@ -395,7 +395,7 @@
             // TODO: the MXParser doesn't actually handle correctly surrogate 
char, ie
             // if orignalText = "𝟯", text = "\ud7ef"
 
-            String unescaped = HtmlTools.unescapeHtml( text );
+            String unescaped = HtmlTools.unescapeHTML( text );
 
             // TODO: StringEscapeUtils.unescapeHtml returns unknown entities 
as is,
             // they should be handled as one character as well

Modified: 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java?rev=776294&r1=776293&r2=776294&view=diff
==============================================================================
--- 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/HtmlTools.java
 Tue May 19 12:36:02 2009
@@ -207,7 +207,7 @@
      * @return a new unescaped <code>String</code>, <code>null</code> if null 
string input.
      * @since 1.1.1.
      */
-    public static String unescapeHtml( String text )
+    public static String unescapeHTML( String text )
     {
         if ( text == null )
         {

Modified: 
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java?rev=776294&r1=776293&r2=776294&view=diff
==============================================================================
--- 
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/util/HtmlToolsTest.java
 Tue May 19 12:36:02 2009
@@ -56,22 +56,22 @@
      */
     public void testUnescapeHTML()
     {
-        assertNull( HtmlTools.unescapeHtml( null ) );
-        assertEquals( "", HtmlTools.unescapeHtml( "" ) );
-        assertEquals( "<", HtmlTools.unescapeHtml( "&lt;" ) );
-        assertEquals( ">", HtmlTools.unescapeHtml( "&gt;" ) );
-        assertEquals( "&", HtmlTools.unescapeHtml( "&amp;" ) );
-        assertEquals( "\"", HtmlTools.unescapeHtml( "&quot;" ) );
-        assertEquals( "&amp;", HtmlTools.unescapeHtml( "&amp;amp;" ) );
-        assertEquals( "&lt;Fran&ccedil;ais&gt;", HtmlTools.unescapeHtml( 
"&amp;lt;Fran&amp;ccedil;ais&amp;gt;" ) );
-        assertEquals( "\u0159", HtmlTools.unescapeHtml( "&#x159;" ) );
-        assertEquals( "\uD808\uDF45", HtmlTools.unescapeHtml( "&#x12345;" ) );
-        assertEquals( "\uD835\uDFED", HtmlTools.unescapeHtml( "&#x1d7ed;" ) );
-        assertEquals( "\uD808\uDF45\uD835\uDFED", HtmlTools.unescapeHtml( 
"&#x12345;&#x1d7ed;" ) );
+        assertNull( HtmlTools.unescapeHTML( null ) );
+        assertEquals( "", HtmlTools.unescapeHTML( "" ) );
+        assertEquals( "<", HtmlTools.unescapeHTML( "&lt;" ) );
+        assertEquals( ">", HtmlTools.unescapeHTML( "&gt;" ) );
+        assertEquals( "&", HtmlTools.unescapeHTML( "&amp;" ) );
+        assertEquals( "\"", HtmlTools.unescapeHTML( "&quot;" ) );
+        assertEquals( "&amp;", HtmlTools.unescapeHTML( "&amp;amp;" ) );
+        assertEquals( "&lt;Fran&ccedil;ais&gt;", HtmlTools.unescapeHTML( 
"&amp;lt;Fran&amp;ccedil;ais&amp;gt;" ) );
+        assertEquals( "\u0159", HtmlTools.unescapeHTML( "&#x159;" ) );
+        assertEquals( "\uD808\uDF45", HtmlTools.unescapeHTML( "&#x12345;" ) );
+        assertEquals( "\uD835\uDFED", HtmlTools.unescapeHTML( "&#x1d7ed;" ) );
+        assertEquals( "\uD808\uDF45\uD835\uDFED", HtmlTools.unescapeHTML( 
"&#x12345;&#x1d7ed;" ) );
 
         try
         {
-            HtmlTools.unescapeHtml( "test &#x1d7ed test" );
+            HtmlTools.unescapeHTML( "test &#x1d7ed test" );
             assertTrue( false );
         }
         catch ( IllegalArgumentException e )

Modified: 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
URL: 
http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java?rev=776294&r1=776293&r2=776294&view=diff
==============================================================================
--- 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
 (original)
+++ 
maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
 Tue May 19 12:36:02 2009
@@ -185,7 +185,7 @@
 
             sink.sectionTitle( Sink.SECTION_LEVEL_1, attribs );
 
-            sink.text( HtmlTools.unescapeHtml( parser.getAttributeValue( null, 
Attribute.NAME.toString() ) ) );
+            sink.text( HtmlTools.unescapeHTML( parser.getAttributeValue( null, 
Attribute.NAME.toString() ) ) );
 
             sink.sectionTitle1_();
         }
@@ -204,7 +204,7 @@
 
             sink.sectionTitle( Sink.SECTION_LEVEL_2, attribs );
 
-            sink.text( HtmlTools.unescapeHtml( parser.getAttributeValue( null, 
Attribute.NAME.toString() ) ) );
+            sink.text( HtmlTools.unescapeHTML( parser.getAttributeValue( null, 
Attribute.NAME.toString() ) ) );
 
             sink.sectionTitle2_();
         }


Reply via email to