Resolved two issues, improved docs
authorAlexander Ebert <ebert@woltlab.com>
Fri, 29 Mar 2019 14:03:36 +0000 (15:03 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 29 Mar 2019 14:03:36 +0000 (15:03 +0100)
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php
wcfsetup/install/files/lib/system/html/node/HtmlNodePlainLink.class.php

index fa89b6a9f365a277142299f94cf2b405371542a0..4ebe95767d4729b25e432e6eb92e63b1a5eac45f 100644 (file)
@@ -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;
                                }
index 676b768e0d77001f1636f70d21e4123d947135cd..6e084bb1126e7fc81ea2b9ddd041265889811d76 100644 (file)
@@ -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');