return '<a %shref="%s">%s</a>' % (classattr, relative_url(params, privileged=privileged), text)
-def link_inline(name, descr=None, args=''):
- if not descr: descr = name
+def link_inline(name, descr=None, kvargs={}):
+ if not descr: descr = humanlink(name)
url = relative_url(name)
if video_re.match(name):
- return '<video src="%s">Your browser does not support the HTML5 video tag</video>' % url
+ return '<video controls="1" src="%s">Your browser does not support the HTML5 video tag</video>' % url
elif img_re.match(name):
- return '<a href="%s"><img border="0" src="%s" alt="%s" /></a>' % (url, url + args, descr)
+ return '<a href="%s"><img border="0" src="%s" alt="%s" /></a>' % (url, url + url_args(kvargs), descr)
elif file_re.match(name) and not ext_re.search(name): # FIXME: this guesses a wiki page
return Page(name).send_naked()
else: