maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Birger Zimmermann (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (DOXIA-455) No XML Entity Encoding (Escaping) is done in FO Footer Generation
Date Tue, 22 Nov 2011 21:59:39 GMT

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

Birger Zimmermann updated DOXIA-455:
------------------------------------

    Attachment: patch.txt

Patch against 1.2 Version

> 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
>            Priority: Minor
>         Attachments: 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:
> ### 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 );
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message