diff --git a/app/classes/web/ajax_handler.py b/app/classes/web/ajax_handler.py index 149bbaee..7d03a052 100644 --- a/app/classes/web/ajax_handler.py +++ b/app/classes/web/ajax_handler.py @@ -368,7 +368,7 @@ class AjaxHandler(BaseHandler): elif page == "delete_photo": if exec_user["superuser"]: - photo = self.get_argument("photo", None) + photo = urllib.parse.unquote(self.get_argument("photo", None)) if photo and photo != "login_1.jpg": os.remove( os.path.join( diff --git a/app/frontend/templates/panel/panel_config.html b/app/frontend/templates/panel/panel_config.html index 414ce1c4..31aed101 100644 --- a/app/frontend/templates/panel/panel_config.html +++ b/app/frontend/templates/panel/panel_config.html @@ -254,17 +254,6 @@

-

{{ translate('panelConfig', 'loginBackground', data['lang']) }}

-
- - -
@@ -409,7 +398,7 @@ 'apply', data['lang']) }} + 'delete', data['lang']) }}
@@ -511,7 +500,7 @@ $.ajax({ type: "POST", headers: { 'X-XSRFToken': token }, - url: '/ajax/delete_photo?photo=' + photo, + url: '/ajax/delete_photo?photo=' + encodeURIComponent(photo), success: function (data) { location.reload(); },