changeset 652:483d2c0ee1f4

fix deletion of empty interwiki links (backport to 1.5)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 16 May 2006 00:23:32 +0200
parents bebe1a6eac56
children 4ebcf0895972
files MoinMoin/converter/text_html_text_x_moin.py MoinMoin/formatter/text_gedit.py docs/CHANGES
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_x_moin.py	Mon May 15 19:23:27 2006 +0200
+++ b/MoinMoin/converter/text_html_text_x_moin.py	Tue May 16 00:23:32 2006 +0200
@@ -1093,6 +1093,8 @@
                 else: 
                     raise ConvertError("Invalid InterWiki link: '%s'" % href)
             elif class_ == "badinterwiki" and title:
+                if href == "/": # we used this as replacement for empty href
+                    href = ""
                 pagename = href
                 interwikiname = "%s:%s" % (title, href)
             if interwikiname and pagename == text: 
--- a/MoinMoin/formatter/text_gedit.py	Mon May 15 19:23:27 2006 +0200
+++ b/MoinMoin/formatter/text_gedit.py	Tue May 16 00:23:32 2006 +0200
@@ -53,7 +53,7 @@
         if not on:
             return self.url(0) # return '</a>'
         html_class = 'badinterwiki' # we use badinterwiki in any case to simplify reverse conversion
-        href = wikiutil.quoteWikinameURL(pagename)
+        href = wikiutil.quoteWikinameURL(pagename) or "/" # FCKeditor behaves strange on empty href
         title = kw.get('title', interwiki)
         return self.url(1, href, title=title, do_escape=1, css=html_class) # interwiki links with pages with umlauts
 
--- a/docs/CHANGES	Mon May 15 19:23:27 2006 +0200
+++ b/docs/CHANGES	Tue May 16 00:23:32 2006 +0200
@@ -59,6 +59,7 @@
     * on action "info" page, "revert" link will not be displayed for empty page
       revisions (but you just can delete the current page to get an empty rev.)
     * fix vanishing strike markup after gui editor usage
+    * fix deletion of empty Interwiki links ([wiki:MoinMaster: mm entry page])
 
 Version 1.5.current:
   Developer notes: