Author: vsiveton Date: Sun May 3 13:34:27 2009 New Revision: 771053 URL: http://svn.apache.org/viewvc?rev=771053&view=rev Log: DOXIA-309: Ligature in author name shows up on page
o take care of headFlag for rawtext o add test case Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java?rev=771053&r1=771052&r2=771053&view=diff ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java (original) +++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java Sun May 3 13:34:27 2009 @@ -25,6 +25,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlHeader2; import com.gargoylesoftware.htmlunit.html.HtmlHeader3; import com.gargoylesoftware.htmlunit.html.HtmlHeader4; +import com.gargoylesoftware.htmlunit.html.HtmlMeta; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.html.HtmlParagraph; import com.gargoylesoftware.htmlunit.html.HtmlPreformattedText; @@ -47,6 +48,10 @@ HtmlPage page = htmlPage( file ); assertNotNull( page ); + HtmlMeta author = (HtmlMeta)page.getHtmlElementsByName( "author" ).get( 0 ); + assertNotNull( author ); + assertTrue( author.toString().indexOf( "Ligature Æ" ) > 0 ); + HtmlElement element = page.getHtmlElementById( "contentBox" ); assertNotNull( element ); HtmlDivision division = (HtmlDivision) element; Modified: maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml URL: http://svn.apache.org/viewvc/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml?rev=771053&r1=771052&r2=771053&view=diff ============================================================================== --- maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml (original) +++ maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/test/resources/site/xdoc/entityTest.xml Sun May 3 13:34:27 2009 @@ -33,7 +33,6 @@ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 file:../../../../../../../doxia/doxia-modules/doxia-module-xdoc/src/main/resources/xdoc-2.0.xsd"> <properties> <title>Test entities, cdatas and comments</title> - <!-- FIXME: DOXIA-309 --> <author email="t...@email.com">Ligature Æ</author> </properties> Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java?rev=771053&r1=771052&r2=771053&view=diff ============================================================================== --- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java (original) +++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/sink/XhtmlBaseSink.java Sun May 3 13:34:27 2009 @@ -1765,7 +1765,13 @@ /** {...@inheritdoc} */ public void rawText( String text ) { - write( text ); + if ( headFlag ) + { + getTextBuffer().append( text ); + } + else { + write( text ); + } } /** {...@inheritdoc} */