Skip to content

Commit f71cf0c

Browse files
committed
Fix of & handling
Now the text is wrapped in cdata section issue #35
1 parent a339081 commit f71cf0c

File tree

1 file changed

+5
-5
lines changed
  • fj-doc-mod-fop/src/main/resources/fj_doc_mod_fop_config/template/macro

1 file changed

+5
-5
lines changed

fj-doc-mod-fop/src/main/resources/fj_doc_mod_fop_config/template/macro/doc_element.ftl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
<#macro handlePhrase current>
3535
<#if (current.link)??>
3636
<#if (current.internal)>
37-
<fo:basic-link <@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/> internal-destination="${current.internalLink}">${current.text}</fo:basic-link>
37+
<fo:basic-link <@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/> internal-destination="${current.internalLink}"><![CDATA[${current.text}]]></fo:basic-link>
3838
<#else>
39-
<fo:basic-link <@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/> external-destination="url('${current.link}')" color="blue" text-decoration="underline">${current.text}</fo:basic-link>
39+
<fo:basic-link <@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/> external-destination="url('${current.link}')" color="blue" text-decoration="underline"><![CDATA[${current.text}]]></fo:basic-link>
4040
</#if>
4141
<#elseif (current.anchor)??>
42-
<fo:block id="${current.anchor}"><@handleWhiteSpace element=current/><@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/>${current.text}</fo:block>
42+
<fo:block id="${current.anchor}"><@handleWhiteSpace element=current/><@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/><![CDATA[${current.text}]]></fo:block>
4343
<#else>
44-
<fo:inline <@handleWhiteSpace element=current/><@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/>>${current.text}</fo:inline>
44+
<fo:inline <@handleWhiteSpace element=current/><@handleStyle styleValue=current.originalStyle/> <@handleFont element=current/>><![CDATA[${current.text}]]></fo:inline>
4545
</#if>
4646
</#macro>
4747

4848
<#macro handleParaRole current role>
49-
<fo:block <#if (current.id)??> id="${current.id}" </#if> <@handleFormat formatValue=current.format!''/><@handleWhiteSpace element=current/><@handleRole role=role element=current/><@handleStyle styleValue=current.originalStyle/><@handleParaSpacing textIndent=current.textIndent!0 spaceBefore=current.spaceBefore!0 spaceAfter=current.spaceAfter!0 spaceLeft=current.spaceLeft!0 spaceRight=current.spaceRight!0/><@handleAlign alignValue=current.align/><@handleFont element=current/>>${current.text?replace(r"${currentPage}","<fo:page-number/>")}<#list current.elementList as currentChild><@handleElement current=currentChild/></#list></fo:block>
49+
<fo:block <#if (current.id)??> id="${current.id}" </#if> <@handleFormat formatValue=current.format!''/><@handleWhiteSpace element=current/><@handleRole role=role element=current/><@handleStyle styleValue=current.originalStyle/><@handleParaSpacing textIndent=current.textIndent!0 spaceBefore=current.spaceBefore!0 spaceAfter=current.spaceAfter!0 spaceLeft=current.spaceLeft!0 spaceRight=current.spaceRight!0/><@handleAlign alignValue=current.align/><@handleFont element=current/>><![CDATA[${current.text?replace(r"${currentPage}","<fo:page-number/>")}]]><#list current.elementList as currentChild><@handleElement current=currentChild/></#list></fo:block>
5050
</#macro>
5151

5252
<#macro handlePara current>

0 commit comments

Comments
 (0)