From c973742bd5383d10e9a297d65aa2749aa3c67676 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 19 Feb 2024 17:54:43 +0100 Subject: [PATCH] Fix unwanted detection of URLs ref https://www.woltlab.com/community/thread/304475-unerwartete-umwandlung-in-einen-link/ --- wcfsetup/install/files/lib/util/FileUtil.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/util/FileUtil.class.php b/wcfsetup/install/files/lib/util/FileUtil.class.php index c0a759c2e2..e7a86de3e5 100644 --- a/wcfsetup/install/files/lib/util/FileUtil.class.php +++ b/wcfsetup/install/files/lib/util/FileUtil.class.php @@ -35,7 +35,7 @@ final class FileUtil /** * A regular expression that allows to detect links within text. */ - public const LINK_REGEX = "#(?i)\\b((?:https?://|www\\d{0,3}[.]|(?:[a-z0-9\\-]+[.])+[a-z]{2,4}/)(?:[^\\s()<>\\[\\]]+|\\([^\\s()<>\\[\\]]*\\))+(?:\\([^\\s()<>\\[\\]]*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))#iS"; + public const LINK_REGEX = "#(?i)\\b((?:https?://|www\\d{0,3}[.])(?:[^\\s()<>\\[\\]]+|\\([^\\s()<>\\[\\]]*\\))+(?:\\([^\\s()<>\\[\\]]*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))#iS"; /** * Prepares the temporary folder and returns its path. -- 2.20.1