use base64 for urls (work some urls don't work otherwise)
This commit is contained in:
parent
19bd818461
commit
614beae48e
2 changed files with 7 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import copy
|
||||
from datetime import datetime
|
||||
import base64
|
||||
import copy
|
||||
|
||||
from django.shortcuts import render, redirect
|
||||
from django.conf import settings
|
||||
|
|
@ -53,9 +53,7 @@ def embed(request, id):
|
|||
})
|
||||
|
||||
def redirect_url(request, url):
|
||||
if request.META['QUERY_STRING']:
|
||||
url += "?" + request.META['QUERY_STRING']
|
||||
|
||||
url = base64.decodebytes(url.encode()).decode()
|
||||
if settings.CONFIG['site'].get('sendReferrer', False):
|
||||
return redirect(url)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue