diff --git a/server/app/common.php b/server/app/common.php index deb4deb0832c031e79452bb6df6f648fdabcfc35..3449a34d2e168d6b930d4fa8f7dd95d0f2b2a8bd 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, '