From 61563de938a164ac6ca50d7e3cacce57f860809d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 14 Feb 2018 14:01:01 +0100 Subject: [PATCH] Consistent representation of dynamically generated teasers --- .../lib/data/article/content/ArticleContent.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php b/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php index b7e267ed89..a1a3fc533c 100644 --- a/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php +++ b/wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php @@ -80,9 +80,11 @@ class ArticleContent extends DatabaseObject implements ILinkableObject, IRouteCo return nl2br(StringUtil::encodeHTML($this->teaser), false); } else { - $htmlInputProcessor = new HtmlInputProcessor(); - $htmlInputProcessor->processIntermediate($this->content); - return nl2br(StringUtil::encodeHTML(StringUtil::truncate($htmlInputProcessor->getTextContent(), 500)), false); + $htmlOutputProcessor = new HtmlOutputProcessor(); + $htmlOutputProcessor->setOutputType('text/plain'); + $htmlOutputProcessor->process($this->content, 'com.woltlab.wcf.article.content', $this->articleContentID, false, $this->languageID); + + return nl2br(StringUtil::encodeHTML(StringUtil::truncate($htmlOutputProcessor->getHtml(), 500)), false); } } -- 2.20.1