Remove support for square brackets in FileUtil::LINK_REGEX
authorMarcel Werk <burntime@woltlab.com>
Wed, 10 Jan 2024 15:33:27 +0000 (16:33 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 10 Jan 2024 15:33:27 +0000 (16:33 +0100)
ref https://www.woltlab.com/community/thread/303714-linkerkennung-innerhalb-von-tags/

wcfsetup/install/files/lib/util/FileUtil.class.php

index 478001603ee3138b468a6cef7d02f82abee4c03e..c0a759c2e26e6f9054a0c87463be4d7bfb2ecd2e 100644 (file)
@@ -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}[.]|(?:[a-z0-9\\-]+[.])+[a-z]{2,4}/)(?:[^\\s()<>\\[\\]]+|\\([^\\s()<>\\[\\]]*\\))+(?:\\([^\\s()<>\\[\\]]*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))#iS";
 
     /**
      * Prepares the temporary folder and returns its path.