*/
public $enableToc = false;
+ /**
+ * Removes any link contained inside the message text.
+ * @var bool
+ * @since 5.2
+ */
+ public $removeLinks = false;
+
/**
* output node processor instance
* @var HtmlOutputNodeProcessor
// dynamic node handlers
$this->invokeNodeHandlers('wcf\system\html\output\node\HtmlOutputNode', ['woltlab-metacode']);
+ if ($this->getHtmlProcessor()->removeLinks) {
+ $links = $this->getDocument()->getElementsByTagName('a');
+ while ($links->length) {
+ DOMUtil::removeNode($links->item(0), true);
+ }
+ }
+
if ($this->outputType !== 'text/html') {
// convert `<p>...</p>` into `...<br><br>`
$paragraphs = $this->getDocument()->getElementsByTagName('p');