Description
The text/html formatter has problem generating valid html code for blockquotes with multiple paragraphs in it.
Steps to reproduce
- In your parser (or macro or action or anything) use something like this to generate html:
1 # correct code for moin--refactor--1.5--current (will be in 1.5.2)
2 def execute(macro, args):
3 formatter = macro.formatter
4 html = ''.join([
5 formatter._open('blockquote'),
6 formatter.paragraph(1),
7 formatter.text('foo'),
8 formatter.paragraph(0),
9 formatter.paragraph(1),
10 formatter.text('bar'),
11 formatter.paragraph(0),
12 formatter._close('blockquote')
13 ])
14 return html
- This will produce output like this:
foo
bar
Which definitely is not valid html.
Example
No exmaple.
Details
MoinMoin Version |
1.5.0 |
OS and Version |
PLD Linux |
Python Version |
2.4.2 |
Server Setup |
cgi |
Server Details |
apache |
Workaround
Use this code instead:
Discussion
The HTML 4.0 DTD doesn't allow to put text in <blockquote> without enclosing tags, like <p>.
Btw: You should not diredctly use the .open() and .close() methods of the (text/html) formatter. They are for internal use only and are not supported by other formatters! (May be we should rename them to ._open and ._close()) Nevertheless this is a bug.
Plan
- Priority:
- Assigned to:
- Status: fixed in moin 1.5 refactor