editable = name and writable and config_get('privileged_url') is not None
if editable:
print(' <link rel="alternate" type="application/x-wiki" title="Edit this page" href="%s" />' \
- % (privileged_path() + '?a=edit&q=' + name))
+ % relative_url('?a=edit&q=' + name, privileged=True))
history = config_get('history_url')
if history is not None:
# Body
if editable:
- print('<body ondblclick="location.href=\'' + privileged_path() + '?a=edit&q=' + name + '\'">')
+ print('<body ondblclick="location.href=\'' + relative_url('?a=edit&q=' + name, privileged=True) + '\'">')
else:
print('<body>')
% (url, url, name)
def link_inline_glob(pattern, descr=None, kvargs={}):
- s = ''
- for name in glob.glob(pattern):
- s += link_inline(name, descr, kvargs)
- return s
+ if not url_re.match(pattern) and bool(set(pattern) & set('?*[')):
+ s = ''
+ for name in glob.glob(pattern):
+ s += link_inline(name, descr, kvargs)
+ return s
+ else:
+ return link_inline(pattern, descr, kvargs)
# Search ---------------------------------------------------