Package: python-moinmoin
Version: 1.8.2-2
Severity: normal
Tags: patch
Pressing Shift+Enter Inside GUI editor inserts a new-line char, which may cause
the table to be broken.
Steps to reproduce:
1. Edit a page in GUI Mode.
2. Inside a cell, type aaa<ENTER>aaa<SHIFT+ENTER>aaa
3. Press save.
The table isn't rendered properly because that moin wiki code is broken. for
example:
||'''Content typed:'''||'''Sample result'''||
||aaa<ENTER>aaa<SHIFT+ENTER>aaa||aaa aaa
aaa ||
||aaa<ENTER>aaa<ENTER>aaa||aaa aaa aaa ||
||aaa<SHIFT+ENTER>aaa<SHIFT+ENTER>aaa||aaa<<BR>>aaa<<BR>>aaa||
Franklin
-- System Information:
Debian Release: 5.0
APT prefers stable
APT policy: (500, 'stable'), (200, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-moinmoin recommends:
ii fckeditor 1:2.6.2-1 rich text format javascript web ed
--- a/MoinMoin/converter/text_html_text_moin_wiki.py 2009-03-01 21:08:05.000000000 +0100
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py 2009-03-01 21:08:08.000000000 +0100
@@ -568,8 +568,10 @@
# self.text.append("\n")
def process_br(self, node):
- self.text.append(self.new_line) # without this, std multi-line text below some heading misses a whitespace
- # when it gets merged to float text, like word word wordword word word
+ self.text.append('<<BR>>') # without this, std multi-line text below some heading misses a whitespace
+ # when it gets merged to float text, like word word wordword word word
+ # note: Do not print a new-line, since it would break moinmoin tables.
+ # regression test: type "aaa<ENTER>aaa<SHIFT+ENTER>aaa"
def process_heading(self, node):
text = self.node_list_text_only(node.childNodes).strip()