diff --git a/pandora/app/views.py b/pandora/app/views.py index 94e1c08c..b6337b4b 100644 --- a/pandora/app/views.py +++ b/pandora/app/views.py @@ -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: diff --git a/static/js/utils.js b/static/js/utils.js index 067822e5..43eb0368 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -2639,7 +2639,10 @@ pandora.openLink = function(url) { if (Ox.startsWith(url, 'mailto:')) { window.open(url); } else { - window.open('/url=' + encodeURIComponent(url), '_blank'); + if (!pandora.site.site.sendReferrer) { + url = '/url=' + btoa(url); + } + window.open(url, '_blank'); } };