diff MoinMoin/wikiutil.py @ 515:1b9f0d6b9f48

fixed double CSS class attribute for nonexistent links, removed ugly formatter.url attrs keyword handling code imported from: moin--main--1.5--patch-519
author Thomas Waldmann <tw@waldmann-edv.de>
date Tue, 28 Mar 2006 21:52:01 +0000
parents ef41e35985dc
children 39da9e68875c
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Tue Mar 28 19:47:18 2006 +0000
+++ b/MoinMoin/wikiutil.py	Tue Mar 28 21:52:01 2006 +0000
@@ -1080,11 +1080,15 @@
                  escaped, so you can give HTML here and it will be used verbatim
     @param formatter: the formatter object to use
     @param on: opening/closing tag only
-    @keyword attrs: additional attrs (HTMLified string)
+    @keyword attrs: additional attrs (HTMLified string) (removed in 1.5.3)
     @rtype: string
     @return: formatted link tag
     """
-    css_class = kw.get('css_class', None)
+    if kw.has_key('css_class'):
+        css_class = kw['css_class']
+        del kw['css_class'] # one time is enough
+    else:
+        css_class = None
     id = kw.get('id', None)
     if text is None:
         text = params # default
@@ -1099,8 +1103,6 @@
         return '</a>'
     
     attrs = ''
-    if kw.has_key('attrs'):
-        attrs += ' ' + kw['attrs']
     if css_class:
         attrs += ' class="%s"' % css_class
     if id: