comparison MoinMoin/formatter/text_html.py @ 34:3ffdb52c6969

remove pretty_url kw where it was unsupported anyway imported from: moin--main--1.5--patch-35
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 25 Sep 2005 12:22:44 +0000
parents 77665d8e2254
children eb3b18ffb28b
comparison
equal deleted inserted replaced
33:55ff4feb0f59 34:3ffdb52c6969
255 if wikitag_bad: 255 if wikitag_bad:
256 html_class = 'badinterwiki' 256 html_class = 'badinterwiki'
257 else: 257 else:
258 html_class = 'interwiki' 258 html_class = 'interwiki'
259 title = kw.get('title', wikitag) 259 title = kw.get('title', wikitag)
260 return self.url(1, href, title=title, unescaped=0, pretty_url=kw.get('pretty_url', 0), css=html_class) 260 return self.url(1, href, title=title, unescaped=0, css=html_class)
261 # unescaped=1 was changed to 0 to make interwiki links with pages with umlauts (or other non-ascii) work 261 # unescaped=1 was changed to 0 to make interwiki links with pages with umlauts (or other non-ascii) work
262 262
263 def url(self, on, url=None, css=None, **kw): 263 def url(self, on, url=None, css=None, **kw):
264 """ 264 """
265 Keyword params: 265 Keyword params:
268 """ 268 """
269 if url is not None: 269 if url is not None:
270 url = wikiutil.mapURL(self.request, url) 270 url = wikiutil.mapURL(self.request, url)
271 title = kw.get('title', None) 271 title = kw.get('title', None)
272 attrs = kw.get('attrs', None) 272 attrs = kw.get('attrs', None)
273 273 if on:
274 #pretty = kw.get('pretty_url', 0) 274 str = '<a'
275 #if not pretty and wikiutil.isPicture(url): 275 if css:
276 # # XXX 276 str = '%s class="%s"' % (str, css)
277 # return '<img src="%s" alt="%s">' % (url,url) 277 if title:
278 278 str = '%s title="%s"' % (str, title)
279 # create link 279 if attrs:
280 if not on: 280 str = '%s %s' % (str, attrs)
281 return '</a>' 281 str = '%s href="%s">' % (str, wikiutil.escape(url, 1))
282 str = '<a' 282 else:
283 283 str = '</a>'
284 if css:
285 str = '%s class="%s"' % (str, css)
286 if title:
287 str = '%s title="%s"' % (str, title)
288 if attrs:
289 str = '%s %s' % (str, attrs)
290 str = '%s href="%s">' % (str, wikiutil.escape(url, 1))
291
292 return str 284 return str
293 285
294 def anchordef(self, id): 286 def anchordef(self, id):
295 return '<a id="%s"></a>\n' % (id, ) 287 return '<a id="%s"></a>\n' % (id, )
296 288