# Prevent crawlers from following links potentially added by spammers or to generated pages
if ss_class == 'external' or ss_class == 'navlink':
classattr += 'rel="nofollow" '
+ elif url_re.match(params):
+ classattr += 'rel="nofollow" '
return '<a %shref="%s">%s</a>' % (classattr, relative_url(params, privileged=privileged), text)
# Search ---------------------------------------------------
if macro:
return apply(macro, (name, descr))
elif img_re.match(name):
+ name = relative_url(name)
# The "extthumb" nonsense works around a limitation of the HTML block model
return '<div class="extthumb"><div class="thumb"><a href="%s"><img border="0" src="%s" alt="%s" /></a><div class="caption">%s</div></div></div>' % (name, name, descr, descr)
else:
if img_re.match(descr):
descr = '<img border="0" src="' + descr + '" />'
- if url_re.match(name):
- return '<a href="%s" rel="nofollow" class="external">%s</a>' % (name, descr)
- elif name.startswith('/'):
- return '<a href="%s">%s</a>' % (name, descr)
- else:
- return link_tag(name, descr, 'wikilink')
+ return link_tag(name, descr, 'wikilink')
def _email_repl(self, word):
return '<a href="mailto:%s">%s</a>' % (word, word)