From 01b964ff1fc5a0849266f043c29914f52e9c0ec9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=81=A5=E4=B9=90?= <690712575@qq.com>
Date: Sun, 2 Apr 2023 08:18:01 +0000
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=9D=E5=AD=98=E6=96=87?=
=?UTF-8?q?=E7=AB=A0=E6=AD=A3=E6=96=87=E6=9B=BF=E6=8D=A2=E7=85=A7=E7=89=87?=
=?UTF-8?q?=E4=BC=9A=E6=84=8F=E5=A4=96=E6=9B=BF=E6=8D=A2=E5=AD=97=E7=AC=A6?=
=?UTF-8?q?=E4=B8=B2=E3=80=82=E5=A6=82=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=9C=A8?=
=?UTF-8?q?=E6=AD=A3=E6=96=87=E9=87=8C=E9=9D=A2=E6=9C=89=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E8=B6=85=E9=93=BE=E6=8E=A5=E4=B9=8B=E7=B1=BB=E7=9A=84=EF=BC=8C?=
=?UTF-8?q?=E5=88=99=E4=BC=9A=E5=8E=BB=E9=99=A4=E6=8E=89=E8=BF=99=E4=B8=AA?=
=?UTF-8?q?=E5=9F=9F=E5=90=8D=E5=AF=BC=E8=87=B4=E6=AD=A3=E6=96=87=E7=9A=84?=
=?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E7=BC=BA=E5=A4=B1=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=E3=80=82=E5=B9=B6=E4=B8=94=E5=AF=BC=E8=87=B4=E5=9C=A8web?=
=?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=AB=AF=E4=B8=8A=E5=AF=8C=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=87=BA=E7=8E=B0=E6=97=A0=E6=B3=95=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 陈健乐 <690712575@qq.com>
---
server/app/common.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/app/common.php b/server/app/common.php
index deb4deb08..3449a34d2 100644
--- a/server/app/common.php
+++ b/server/app/common.php
@@ -195,7 +195,8 @@ function download_file($url, $saveDir, $fileName)
function clear_file_domain($content)
{
$fileUrl = FileService::getFileUrl();
- return str_replace($fileUrl, '/', $content);
+ $pattern = '/
]*\bsrc=["\']'.preg_quote($fileUrl, '/').'([^"\']+)["\']/i';
+ return preg_replace($pattern, '