From: Holger Schurig Date: Thu, 24 Jun 2010 08:24:45 +0000 (+0200) Subject: link.py: validate link X-Git-Url: https://oss.titaniummirror.com/gitweb?p=webber.git;a=commitdiff_plain;h=69d1d9d06d799ea551c90fbe5e9e7bc9e7fc1c01 link.py: validate link --- diff --git a/plugins/link.py b/plugins/link.py index 6b57e25..f7ecb2a 100644 --- a/plugins/link.py +++ b/plugins/link.py @@ -41,7 +41,11 @@ def do_link(m): break if not text: text = link - # TODO: validate link + # validate link + # TODO: validating local files still not working + if not link.startswith("http:") and not link.endswith(".html") and not link.endswith(".png"): + file = get_current_file() + warning("%s: unknown link to '%s'" % (file.rel_path, link) ) return '%s' % (link, anchor, text)