blck

ephemeral pastebin/url shortener
git clone https://git.parazyd.org/blck
Log | Files | Refs | README | LICENSE

commit b582e5737b0f63ef174054d42fad74987b14164f
parent d4532afd8468c3f519d9ab33c5b820b05f6a9c71
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 20 Mar 2017 00:27:14 +0100

better handling of newlines

Diffstat:
Mblck.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/blck.py b/blck.py @@ -29,7 +29,7 @@ def u(urlshort): if "curl" not in flask.request.headers.get('User-Agent'): return flask.redirect(realurl, code=301) else: - return realurl + '\n' + return realurl @app.route("/s", methods=['POST']) def s(): @@ -56,7 +56,7 @@ def s(): urlshort = genid() try: f = open('uris/' + urlshort, 'w') - f.write(url) + f.write(url + '\n') f.close() except: return "could not save url\n"