simpler @{} support
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.7 (2012-04-19 22:33:54) dev
|
Version 1.99.7 (2012-04-19 22:47:29) dev
|
||||||
|
|||||||
@@ -366,8 +366,8 @@ def render(text,extra={},allowed={},sep='p',URL=None,environment=None):
|
|||||||
# this is experimental @{controller/index/args}
|
# this is experimental @{controller/index/args}
|
||||||
# turns into a digitally signed URL
|
# turns into a digitally signed URL
|
||||||
def u1(match,URL=URL):
|
def u1(match,URL=URL):
|
||||||
a,b,c = match.group('a'), match.group('b'), match.group('c')
|
b,c = match.group('a'), match.group('b'), match.group('c')
|
||||||
return URL(a,b,args=c.split('/'),scheme=True,host=True)
|
return URL(b,args=c.split('/'),scheme=True,host=True)
|
||||||
text = re.compile(
|
text = re.compile(
|
||||||
'@\{(?P<a>\w+)/(?P<b>\w+)/(?P<c>.+?)\}'
|
'@\{(?P<a>\w+)/(?P<b>\w+)/(?P<c>.+?)\}'
|
||||||
).sub(u1,text)
|
).sub(u1,text)
|
||||||
|
|||||||
Reference in New Issue
Block a user