diff --git a/logbot.py b/logbot.py index 24afa63..cf0177a 100755 --- a/logbot.py +++ b/logbot.py @@ -67,6 +67,10 @@ pat1 = re.compile(r"(^|[\n ])(([\w]+?://[\w\#$%&~.\-;:=,?@\[\]+]*)(/[\w\#$%&~/.\ flaskapp = Flask(__name__) flaskapp.config["TEMPLATES_AUTO_RELOAD"] = True +@flaskapp.template_filter('md5') +def format_md5(value): + return md5(value).hexdigest() + def urlify2(value): return pat1.sub(r'\1\3', value) #return urlfinder.sub(r'\1', value) diff --git a/templates/messages.html b/templates/messages.html index 7786593..2abe04c 100644 --- a/templates/messages.html +++ b/templates/messages.html @@ -29,7 +29,7 @@ < - + {{ message.nickname }}