I want to generate HTML pages with rst2html, using my own templates. these templates include many % signs, like in
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
now, when I call rst2html using the command
rst2html --template=layout2.tpl rst/index.rst > index.html
i get the error
ValueError: unsupported format character ‘”‘ (0x22) at index 827
i found out the problem is that rst2html thinks that the %” is a placeholder.
i already tried escaping the % in the template, like
<TABLE border="0" cellpadding="0" cellspacing="0" width="100\%">
but this is not working, the error is the same.
so my question is how i can solve this issue. any help is greatly appreciated!
Have you tried obvious things: escaping the ‘%’ with ‘%’?
Here is normal string formatting to display a percent sign in the result:
Maybe rst2html is the same? (I haven’t tried this in rst2html — I don’t have it installed.)
Okay, now I’ve installed docutils. This works for me:
layout2.tpl:
Command line:
So the result is as desired, I believe.