From d79da28abaa831530dd29262241e1834f34d47a7 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 30 Aug 2021 16:34:24 +0200 Subject: [PATCH] =?UTF-8?q?dialog=20confirmation=20ScoDoc:=20evite=20reque?= =?UTF-8?q?st.base=5Furl=20qui=20peut=20=C3=AAtre=20en=20http.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_utils.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index fcbfb4a76..58bf97568 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -46,8 +46,7 @@ import time import traceback import types import unicodedata -import six.moves.urllib.parse, six.moves.urllib.error -import six.moves.urllib.error, six.moves.urllib.parse +import urllib from xml.etree import ElementTree from flask import g, current_app @@ -817,11 +816,14 @@ def confirm_dialog( # Attention: la page a pu etre servie en GET avec des parametres # si on laisse l'url "action" vide, les parametres restent alors que l'on passe en POST... if not dest_url: - dest_url = request.base_url - # strip remaining parameters from destination url: - dest_url = six.moves.urllib.parse.splitquery(dest_url)[0] + action = "" + else: + # strip remaining parameters from destination url: + dest_url = urllib.parse.splitquery(dest_url)[0] + action = f'action="{dest_url}"' + H = [ - """
""" % dest_url, + f"""""", message, """""" % OK, ]