From ab803011cda72fdff8ea081ea21ec49f628909e8 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 2 Oct 2013 22:15:26 -0400 Subject: [PATCH] html for urls --- service/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/app.py b/service/app.py index e483fa6..3f56c7d 100644 --- a/service/app.py +++ b/service/app.py @@ -171,12 +171,15 @@ def archive(): q = request.args.get('q') text = 'text' in request.args + html = 'html' in request.args if not q: abort(404) url = URL.get_or_store(q) + if html: + return url.html if text: return url.text, 200, {'Content-Type': 'text/x-markdown; charset=UTF-8'}