diff --git a/VERSION b/VERSION index 3a9ba2ba..4c7eb0ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.7 (2012-03-19 15:55:45) dev +Version 1.99.7 (2012-03-19 16:04:11) dev diff --git a/gluon/tools.py b/gluon/tools.py index 478d977a..26181cbe 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -73,9 +73,11 @@ def call_or_redirect(f,*args): redirect(f) def replace_id(url, form): - if url and not url[0] == '/' and url[:4] != 'http': - return URL(url.replace('[id]', str(form.vars.id))) - return url + if url: + url = url.replace('[id]', str(form.vars.id)) + if url[0] == '/' or url[:4] == 'http': + return url + return URL(url) class Mail(object): """