From 75af8f9f76b5ccf3b8d5ca08e2ef7d6b282e30df Mon Sep 17 00:00:00 2001 From: nixevol Date: Thu, 17 Sep 2026 09:50:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=9A=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E8=BE=93=E5=85=A5=E6=A1=86=20Enter=20?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E8=BF=9E=E6=8E=A5=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=A1=86=E5=86=85=20=E2=9C=95=20=E6=B8=85=E9=99=A4=EF=BC=9B?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=86=85=E8=81=94=20SVG=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E6=A0=B7=E5=BC=8F=E8=A2=AB=20DOMPurify=20?= =?UTF-8?q?=E4=B8=A2=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_toolbox.py | 6 ++++++ ui/building_page.py | 15 +++------------ ui/layout.py | 9 +++++++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/test_toolbox.py b/tests/test_toolbox.py index 2c97116..cc88238 100644 --- a/tests/test_toolbox.py +++ b/tests/test_toolbox.py @@ -207,6 +207,12 @@ class PageTest(unittest.TestCase): "id": "20260815-a0000001", "kind": "market", "status": "success" })) + def test_global_css_survives_streamlit_sanitizer(self): + # st.html 经 DOMPurify 清洗,样式里出现 "<"(如内联 SVG)会让整段 ")