From aec3ecd7af2dcf1f757c1594f0c006d2ac57c551 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 7 Sep 2009 21:54:21 +0200 Subject: [PATCH] Do not try to glob URLs and non glob strings --- geekigeeki.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 5b26b55..9a05b85 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -146,7 +146,7 @@ def send_title(name, text="Limbo", msg_text=None, msg_type='error', writable=Fal editable = name and writable and config_get('privileged_url') is not None if editable: print(' ' \ - % (privileged_path() + '?a=edit&q=' + name)) + % relative_url('?a=edit&q=' + name, privileged=True)) history = config_get('history_url') if history is not None: @@ -157,7 +157,7 @@ def send_title(name, text="Limbo", msg_text=None, msg_type='error', writable=Fal # Body if editable: - print('') + print('') else: print('') @@ -237,10 +237,13 @@ def link_inline(name, descr=None, kvargs={}): % (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 --------------------------------------------------- -- 2.25.1