comparison MoinMoin/action/AttachFile.py @ 1816:4a31739bc6e1

Page.url(): removed escaping support
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 25 Feb 2007 03:08:18 +0100
parents dca96e7c8199
children b180f047d918
comparison
equal deleted inserted replaced
1815:4dbc0547b7e0 1816:4a31739bc6e1
157 attach_dir = getAttachDir(request, pagename) 157 attach_dir = getAttachDir(request, pagename)
158 files = [] 158 files = []
159 if os.path.isdir(attach_dir): 159 if os.path.isdir(attach_dir):
160 files = os.listdir(attach_dir) 160 files = os.listdir(attach_dir)
161 page = Page(request, pagename) 161 page = Page(request, pagename)
162 # TODO: remove escape=0 in 2.0 162 link = page.url(request, {'action': 'AttachFile'})
163 link = page.url(request, {'action': 'AttachFile'}, escape=0)
164 attach_info = _('There are <a href="%(link)s">%(count)s attachment(s)</a> stored for this page.', formatted=False) % { 163 attach_info = _('There are <a href="%(link)s">%(count)s attachment(s)</a> stored for this page.', formatted=False) % {
165 'count': len(files), 164 'count': len(files),
166 'link': wikiutil.escape(link) 165 'link': wikiutil.escape(link)
167 } 166 }
168 return "\n<p>\n%s\n</p>\n" % attach_info 167 return "\n<p>\n%s\n</p>\n" % attach_info