changeset 3960:4fb99140c7c6

fixing bug when insert comment using gui editor additional new line add
author Byeongweon [tasyblue@gmail.com]
date Sat, 28 Jun 2008 02:23:31 +0900
parents 8c04b4e35da3
children 60b2a8ca5903
files MoinMoin/action/fckdialog.py MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/fckdialog.py	Wed Jun 25 19:18:40 2008 +0900
+++ b/MoinMoin/action/fckdialog.py	Sat Jun 28 02:23:31 2008 +0900
@@ -7,7 +7,7 @@
 """
 
 from MoinMoin import config, wikiutil
-import re
+import re
 
 ##############################################################################
 ### Macro dialog
@@ -238,7 +238,7 @@
     else:
         resultlist = iwpreferred[:-1]
     interwiki = "\n".join(
-        ['<option value="%s">%s</option>' % (key, key) for key in resultlist])
+        ['<option value="%s">%s</option>' % (key, key) for key in resultlist])
 
     # wiki url
     url_prefix_static = request.cfg.url_prefix_static
@@ -246,7 +246,8 @@
     if not scriptname or scriptname[-1] != "/":
         scriptname += "/"
     action = scriptname
-    basepage = request.page.page_name.encode(config.charset)
+    basepage = request.page.page_name.encode(config.charset)
+            
     request.write('''
 <!--
  * FCKeditor - The text editor for internet
@@ -323,7 +324,7 @@
          <td>
           <span fckLang="WikiDlgName">Wiki:PageName</span><br>
           <select id="sctInterwiki" size="1">
-          %(interwiki)s
+          %(interwiki)s 
           </select>:
           <input id="txtInterwikipagename"></input>
          </td>
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Wed Jun 25 19:18:40 2008 +0900
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Jun 28 02:23:31 2008 +0900
@@ -870,8 +870,8 @@
         if class_ == "comment": # we currently use this for stuff like ## or #acl
             for i in node.childNodes:
                 if i.nodeType == Node.TEXT_NODE:
-                    self.text.append(i.data)
-                    #print "'%s'" % i.data
+                    self.text.append(i.data.replace('\n', '')) # remove useless new line
+                    #print "'%s'" % i.data.replace('\n', '')
                 elif i.localName == 'br':
                     self.text.append(self.new_line)
                 else: