Mercurial > moin > 1.9
changeset 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 | 55ff4feb0f59 |
children | f0af060fb82b |
files | MoinMoin/formatter/text_gedit.py MoinMoin/formatter/text_html.py MoinMoin/macro/RecentChanges.py MoinMoin/user.py MoinMoin/userform.py MoinMoin/wikiacl.py MoinMoin/wikimacro.py |
diffstat | 7 files changed, 19 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/formatter/text_gedit.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/formatter/text_gedit.py Sun Sep 25 12:22:44 2005 +0000 @@ -44,7 +44,7 @@ html_class = 'badinterwiki' # we use badinterwiki in any case to simplify reverse conversion href = wikiutil.quoteWikinameURL(pagename) title = kw.get('title', interwiki) - return self.url(1, href, title=title, unescaped=0, pretty_url=kw.get('pretty_url', 0), css=html_class) + return self.url(1, href, title=title, unescaped=0, css=html_class) # unescaped=1 was changed to 0 to make interwiki links with pages with umlauts (or other non-ascii) work '''
--- a/MoinMoin/formatter/text_html.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/formatter/text_html.py Sun Sep 25 12:22:44 2005 +0000 @@ -257,7 +257,7 @@ else: html_class = 'interwiki' title = kw.get('title', wikitag) - return self.url(1, href, title=title, unescaped=0, pretty_url=kw.get('pretty_url', 0), css=html_class) + return self.url(1, href, title=title, unescaped=0, css=html_class) # unescaped=1 was changed to 0 to make interwiki links with pages with umlauts (or other non-ascii) work def url(self, on, url=None, css=None, **kw): @@ -270,25 +270,17 @@ url = wikiutil.mapURL(self.request, url) title = kw.get('title', None) attrs = kw.get('attrs', None) - - #pretty = kw.get('pretty_url', 0) - #if not pretty and wikiutil.isPicture(url): - # # XXX - # return '<img src="%s" alt="%s">' % (url,url) - - # create link - if not on: - return '</a>' - str = '<a' - - if css: - str = '%s class="%s"' % (str, css) - if title: - str = '%s title="%s"' % (str, title) - if attrs: - str = '%s %s' % (str, attrs) - str = '%s href="%s">' % (str, wikiutil.escape(url, 1)) - + if on: + str = '<a' + if css: + str = '%s class="%s"' % (str, css) + if title: + str = '%s title="%s"' % (str, title) + if attrs: + str = '%s %s' % (str, attrs) + str = '%s href="%s">' % (str, wikiutil.escape(url, 1)) + else: + str = '</a>' return str def anchordef(self, id):
--- a/MoinMoin/macro/RecentChanges.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/macro/RecentChanges.py Sun Sep 25 12:22:44 2005 +0000 @@ -75,13 +75,13 @@ img = request.theme.make_icon('updated') html_link = wikiutil.link_tag(request, wikiutil.quoteWikinameURL(pagename) + "?action=diff&date=%d" % bookmark_usecs, - img, formatter=macro.formatter, pretty_url=1) + img, formatter=macro.formatter) else: # show "DIFF" icon else img = request.theme.make_icon('diffrc') html_link = wikiutil.link_tag(request, wikiutil.quoteWikinameURL(line.pagename) + "?action=diff", - img, formatter=macro.formatter, pretty_url=1) + img, formatter=macro.formatter) # print name of page, with a link to it force_split = len(page.page_name) > _MAX_PAGENAME_LENGTH @@ -130,7 +130,7 @@ img = request.theme.make_icon('info') info_html = wikiutil.link_tag(request, wikiutil.quoteWikinameURL(line.pagename) + "?action=info", - img, formatter=macro.formatter, pretty_url=1) + img, formatter=macro.formatter) d['info_html'] = info_html return request.theme.recentchanges_entry(d)
--- a/MoinMoin/user.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/user.py Sun Sep 25 12:22:44 2005 +0000 @@ -125,7 +125,7 @@ @return: user name that can be used in acl lines """ name = name.replace('_', ' ') # we treat _ as a blank - username_allowedchars = "'" # O'Brian :) + username_allowedchars = "'" # ' for names like O'Brian. "," and ":" must not be allowed (ACL delimiters). # Strip non alpha numeric characters (except username_allowedchars), keep white space name = ''.join([c for c in name if c.isalnum() or c.isspace() or c in username_allowedchars])
--- a/MoinMoin/userform.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/userform.py Sun Sep 25 12:22:44 2005 +0000 @@ -646,7 +646,7 @@ data.addRow(( #request.formatter.code(1) + uid + request.formatter.code(0), request.formatter.rawHTML(namelink), - (request.formatter.url(1, 'mailto:' + account.email, css='mailto', pretty_url=1, unescaped=1) + + (request.formatter.url(1, 'mailto:' + account.email, css='mailto', unescaped=1) + request.formatter.text(account.email) + request.formatter.url(0)), #'',
--- a/MoinMoin/wikiacl.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/wikiacl.py Sun Sep 25 12:22:44 2005 +0000 @@ -291,7 +291,6 @@ else: # Get entries try: - # XXX TODO disallow : and , in usernames entries, self.rest = self.rest.split(':', 1) except ValueError: self.finished = 1
--- a/MoinMoin/wikimacro.py Sun Sep 25 11:36:51 2005 +0000 +++ b/MoinMoin/wikimacro.py Sun Sep 25 12:22:44 2005 +0000 @@ -548,7 +548,7 @@ if self.request.user.valid: # decode address and generate mailto: link email = decodeSpamSafeEmail(email) - result = (self.formatter.url(1, 'mailto:' + email, css='mailto', pretty_url=1, unescaped=1) + + result = (self.formatter.url(1, 'mailto:' + email, css='mailto', unescaped=1) + self.formatter.text(text or email) + self.formatter.url(0)) else: