Improved pathchooser

This commit is contained in:
Ozzie Isaacs 2023-07-09 10:00:54 +02:00
parent 63b7d70f33
commit 3f5583017f
1 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@ from functools import wraps
from urllib.parse import urlparse
from flask import Blueprint, flash, redirect, url_for, abort, request, make_response, send_from_directory, g, Response
from flask import Markup
from flask_login import login_required, current_user, logout_user
from flask_babel import gettext as _
from flask_babel import get_locale, format_time, format_datetime, format_timedelta
@ -1035,7 +1036,8 @@ def pathchooser():
for f in folders:
try:
data = {"name": f, "fullpath": os.path.join(cwd, f)}
sanitized_f = str(Markup.escape(f))
data = {"name": sanitized_f, "fullpath": os.path.join(cwd, sanitized_f)}
data["sort"] = data["fullpath"].lower()
except Exception:
continue