Commit dabe2e97 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Fixed long URL prefix issues.

parent f02c10f1
function expand( id ) {
var box = document.getElementById( id );
if( box.style.display=="none" ) {
box.style.display="block";
} else {
box.style.display="none";
}
}
......@@ -9,6 +9,7 @@ Go Url Shortener
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="http://fonts.googleapis.com/css?family=Carrois+Gothic" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/site_data/style.css" />
<script type="text/javascript" src="/site_data/go.js"></script>
</head>
<body>
......
......@@ -47,6 +47,8 @@ def application(environ, start_response):
# Store parsed user data in these handy variables.
long_url = data["long-url"]
short_url = data["short-url"]
if not (long_url.startswith("http") or long_url.startswith("ftp")):
long_url = "http://" + long_url
long_url = urllib.unquote( long_url )
short_url = urllib.unquote( short_url )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment