From a75159b57ebcc1167a3468c8307bdfbc4c214642 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 20 Jun 2023 01:01:42 +0200 Subject: [PATCH] WebHost: import Markup from markupsafe (#1848) --- WebHostLib/api/generate.py | 3 ++- WebHostLib/check.py | 3 ++- WebHostLib/requirements.txt | 1 + WebHostLib/upload.py | 5 +++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/WebHostLib/api/generate.py b/WebHostLib/api/generate.py index 04a93f2cf463..61e9164e2652 100644 --- a/WebHostLib/api/generate.py +++ b/WebHostLib/api/generate.py @@ -2,7 +2,8 @@ import pickle from uuid import UUID -from flask import request, session, url_for, Markup +from flask import request, session, url_for +from markupsafe import Markup from pony.orm import commit from WebHostLib import app diff --git a/WebHostLib/check.py b/WebHostLib/check.py index 3d71fe7798d4..3daef72c0335 100644 --- a/WebHostLib/check.py +++ b/WebHostLib/check.py @@ -1,7 +1,8 @@ import zipfile from typing import * -from flask import request, flash, redirect, url_for, render_template, Markup +from flask import request, flash, redirect, url_for, render_template +from markupsafe import Markup from WebHostLib import app diff --git a/WebHostLib/requirements.txt b/WebHostLib/requirements.txt index 9e3551db69f9..a8b2865aae34 100644 --- a/WebHostLib/requirements.txt +++ b/WebHostLib/requirements.txt @@ -6,3 +6,4 @@ Flask-Caching>=2.0.2 Flask-Compress>=1.13 Flask-Limiter>=3.3.0 bokeh>=3.1.1 +markupsafe>=2.1.3 diff --git a/WebHostLib/upload.py b/WebHostLib/upload.py index 04ee5b8756ef..89a839cfa364 100644 --- a/WebHostLib/upload.py +++ b/WebHostLib/upload.py @@ -7,12 +7,13 @@ import zlib from io import BytesIO -from flask import request, flash, redirect, url_for, session, render_template, Markup +from flask import request, flash, redirect, url_for, session, render_template +from markupsafe import Markup from pony.orm import commit, flush, select, rollback from pony.orm.core import TransactionIntegrityError import MultiServer -from NetUtils import NetworkSlot, SlotType +from NetUtils import SlotType from Utils import VersionException, __version__ from worlds.Files import AutoPatchRegister from . import app