From: Cyperghost Date: Thu, 11 Apr 2024 13:38:02 +0000 (+0200) Subject: Mark `HtmlBBCodeParser` as deprecated X-Git-Tag: 6.1.0_Alpha_1~129^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9933b9d5a2300edd3232e60016798fb0706bdaa2;p=GitHub%2FWoltLab%2FWCF.git Mark `HtmlBBCodeParser` as deprecated --- diff --git a/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php index 44181ceb03..17f146326d 100644 --- a/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/DomBBCodeParser.class.php @@ -33,6 +33,12 @@ final class DomBBCodeParser extends SingletonFactory */ private array $useTextNodes = []; + /** + * tag names used to isolate bbcodes contained in source code elements + * @var string[] + */ + public static array $codeTagNames = ['kbd', 'pre']; + /** * Parses bbcodes in the given DOM document. */ @@ -112,7 +118,7 @@ final class DomBBCodeParser extends SingletonFactory private function convertBBCodeToMetacodeMarker(\DOMNode $node): void { - if (\in_array($node->nodeName, HtmlBBCodeParser::$codeTagNames)) { + if (\in_array($node->nodeName, DomBBCodeParser::$codeTagNames)) { // don't parse bbcode inside code tags return; } diff --git a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php index 19e9409b65..ae94f71c17 100644 --- a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php @@ -21,6 +21,7 @@ use wcf\util\StringUtil; * @copyright 2001-2019 WoltLab GmbH * @license GNU Lesser General Public License * @since 3.0 + * @deprecated 6.1 use `DomBBCodeParser` instead */ class HtmlBBCodeParser extends BBCodeParser {