Commit 44d1ef14 authored by kaiyou's avatar kaiyou
Browse files

Encode filename before using it in URL

parent 3b1f28da
......@@ -5,12 +5,13 @@ import os
import binascii
import requests
import io
import urllib
def get_image(root, name):
""" Try and get basic image attributes.
filename = os.path.basename(name)
filename = urllib.parse.quote(os.path.basename(name))
return (root + os.path.join(app.config["FULL_WEB"], filename),
root + os.path.join(app.config["THUMB_WEB"], filename))
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