You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@codehaus.org> on 2013/03/29 21:02:52 UTC

[jira] (DOXIA-455) No XML Entity Encoding (Escaping) is done in FO Footer Generation

     [ https://jira.codehaus.org/browse/DOXIA-455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed DOXIA-455.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4
         Assignee: Robert Scholte  (was: Lukas Theussl)

Fixed in [r1462625|http://svn.apache.org/r1462625]
Thanks!
                
> No XML Entity Encoding (Escaping) is done in FO Footer Generation
> -----------------------------------------------------------------
>
>                 Key: DOXIA-455
>                 URL: https://jira.codehaus.org/browse/DOXIA-455
>             Project: Maven Doxia
>          Issue Type: Bug
>          Components: Module - FO
>    Affects Versions: 1.2, 1.3
>            Reporter: Birger Zimmermann
>            Assignee: Robert Scholte
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: doxia-module-fo-test.zip, patch.txt, test case patch.txt
>
>
> When using an ampersand in the pom.xml organization.name e.g. "Some Company & Friends" the resulting fo file has xml parse errors.
> Soulution seems to be:
> {noformat}
> ### Eclipse Workspace Patch 1.0
> #P doxia-module-fo
> Index: src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java
> ===================================================================
> --- src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java	(revision 1205142)
> +++ src/main/java/org/apache/maven/doxia/module/fo/FoAggregateSink.java	(working copy)
> @@ -733,7 +733,7 @@
>              actualYear = Calendar.getInstance().get( Calendar.YEAR );
>          }
>  
> -        return "&#169;" + actualYear + ", " + companyName + add;
> +        return "&#169;" + actualYear + ", " + escaped(companyName, false) + add;
>      }
>  
>      /**
> @@ -826,11 +826,11 @@
>  
>          if ( headerText == null )
>          {
> -            write( docTitle );
> +            text( docTitle );
>          }
>          else
>          {
> -            write( headerText );
> +            text( headerText );
>          }
>  
>          writeEndTag( BLOCK_TAG );
> @@ -927,7 +927,7 @@
>              atts.addAttribute( "text-align-last", "justify" );
>              writeStartTag( BLOCK_TAG, atts );
>              writeStartTag( BASIC_LINK_TAG, "internal-destination", ref );
> -            write( tocItem.getName() );
> +            text( tocItem.getName() );
>              writeEndTag( BASIC_LINK_TAG );
>              writeEmptyTag( LEADER_TAG, "toc.leader.style" );
>              writeStartTag( INLINE_TAG, "page.number" );
> @@ -985,7 +985,7 @@
>  
>              writeStartTag( BOOKMARK_TAG, "internal-destination", ref );
>              writeStartTag( BOOKMARK_TITLE_TAG );
> -            write( tocItem.getName() );
> +            text( tocItem.getName() );
>              writeEndTag( BOOKMARK_TITLE_TAG );
>  
>              if ( tocItem.getItems() != null )
> @@ -1134,7 +1134,7 @@
>  
>          writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2", "cover.border.left" );
>          writeStartTag( BLOCK_TAG, "cover.title" );
> -        write( title == null ? "" : title );
> +        text( title == null ? "" : title );
>          writeEndTag( BLOCK_TAG );
>          writeEndTag( TABLE_CELL_TAG );
>          writeEndTag( TABLE_ROW_TAG );
> @@ -1146,10 +1146,10 @@
>  
>          writeStartTag( TABLE_CELL_TAG, "number-columns-spanned", "2", "cover.border.left.bottom" );
>          writeStartTag( BLOCK_TAG, "cover.subtitle" );
> -        write( subtitle == null ? ( version == null ? "" : " v. " + version ) : subtitle );
> +        text( subtitle == null ? ( version == null ? "" : " v. " + version ) : subtitle );
>          writeEndTag( BLOCK_TAG );
>          writeStartTag( BLOCK_TAG, "cover.subtitle" );
> -        write( type == null ? "" : type );
> +        text( type == null ? "" : type );
>          writeEndTag( BLOCK_TAG );
>          writeEndTag( TABLE_CELL_TAG );
>          writeEndTag( TABLE_ROW_TAG );
> @@ -1214,7 +1214,7 @@
>          att.addAttribute( "height", "0.3in" );
>          att.addAttribute( "text-align", "left" );
>          writeStartTag( BLOCK_TAG, att );
> -        write( compName == null ? ( cover.getAuthor() == null ? "" : cover.getAuthor() ) : compName );
> +        text( compName == null ? ( cover.getAuthor() == null ? "" : cover.getAuthor() ) : compName );
>          writeEndTag( BLOCK_TAG );
>          writeEndTag( TABLE_CELL_TAG );
>  
> @@ -1223,7 +1223,7 @@
>          att.addAttribute( "height", "0.3in" );
>          att.addAttribute( "text-align", "right" );
>          writeStartTag( BLOCK_TAG, att );
> -        write( date == null ? "" : date );
> +        text( date == null ? "" : date );
>          writeEndTag( BLOCK_TAG );
>          writeEndTag( TABLE_CELL_TAG );
>  {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira