fedenunez / docbook2twiki

Automatically exported from code.google.com/p/docbook2twiki
0 stars 0 forks source link

{, } and \ are not escaped in confluence export #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Input this org to 'org-export-as-twiki' with 'docbook2cfl.xsl' as 
'org-export-docbook2twiki-xsl-file'

A Test

I Like to use { and } and \.

2. You get as '.twiki' result:

{toc:maxLevel=3}
I Like to use { and } and \. 

What is the expected output? What do you see instead?

{, } and \ are special chars in confluence, they should be escaped:

{toc:maxLevel=3}
I Like to use \{ and \} and \. 

What version of the product are you using? On what operating system?

docbook2cfl.xsl,v 1.6, MacOS

Please provide any additional information below.

Patch attached

Original issue reported on code.google.com by bitti1...@gmail.com on 30 Aug 2011 at 11:48

GoogleCodeExporter commented 8 years ago
I'm very sorry, I noticed to late that the order of replacements is important, 
therefore the ampersand got escaped twice... Please accept my corrected patch, 
wich translates the org

A Test

I Like to use & and  < and > and { and } and \.

correctly to

{toc:maxLevel=3}
I Like to use & and  < and > and \{ and \} and \. 

I would be goot if you can provide a function to do parallel replaces, because 
the dependencies are getting difficult. I'm not an XSLT expert, therefore it 
might be difficult to implement it myself.

Original comment by bitti1...@gmail.com on 31 Aug 2011 at 9:12

Attachments: