From: Alexander Ebert Date: Fri, 29 Mar 2019 14:03:36 +0000 (+0100) Subject: Resolved two issues, improved docs X-Git-Tag: 5.2.0_Alpha_1~176^2~7^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d8daea35bbfcc35e04cb29ccf1fe68828d3eeff6;p=GitHub%2FWoltLab%2FWCF.git Resolved two issues, improved docs --- diff --git a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php index fa89b6a9f3..4ebe95767d 100644 --- a/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php @@ -162,10 +162,11 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor { EventHandler::getInstance()->fireAction($this, 'beforeEmbeddedProcess'); + $this->convertPlainLinks(); + // extract embedded content $this->processEmbeddedContent(); - $this->convertPlainLinks(); EventHandler::getInstance()->fireAction($this, 'afterProcess'); } @@ -613,7 +614,7 @@ class HtmlInputNodeProcessor extends AbstractHtmlNodeProcessor { } } - if (!$mayContainOtherContent || $linebreaks > 1) { + if (!$mayContainOtherContent || $linebreaks <= 1) { $this->plainLinks[] = $plainLink->setIsStandalone($parent); continue; } diff --git a/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php b/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php index 676b768e0d..6e084bb112 100644 --- a/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php +++ b/wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php @@ -144,7 +144,7 @@ class HtmlNodePlainLink { $this->markAsTainted(); if ($this->objectID === 0) { - throw new \UnexpectedValueException('The objectID must not be null.'); + throw new \UnexpectedValueException('The objectID must not be zero.'); } $metacodeElement = $this->link->ownerDocument->createElement('woltlab-metacode');