From d8daea35bbfcc35e04cb29ccf1fe68828d3eeff6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 29 Mar 2019 15:03:36 +0100 Subject: [PATCH] Resolved two issues, improved docs --- .../system/html/input/node/HtmlInputNodeProcessor.class.php | 5 +++-- .../files/lib/system/html/node/HtmlNodePlainLink.class.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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'); -- 2.20.1