$this->embeddedContent = $this->getHtmlInputNodeProcessor()->getEmbeddedContent();
}
+ /**
+ * Processes a HTML string to provide the general DOM API. This method
+ * does not perform any filtering or validation. You SHOULD NOT use this
+ * to deal with HTML that has not been filtered previously.
+ *
+ * @param string $html html string
+ */
+ public function processIntermediate($html) {
+ $this->getHtmlInputNodeProcessor()->load($this, $html);
+ }
+
/**
* Processes only embedded content. This method should only be called when rebuilding
* data where only embedded content is relevant, but no actual parsing is required.
use wcf\data\object\type\ObjectTypeCache;
use wcf\data\IMessage;
use wcf\system\exception\SystemException;
+use wcf\system\html\input\HtmlInputProcessor;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
use wcf\util\ArrayUtil;
+use wcf\util\DOMUtil;
/**
* Manages message quotes.
$this->quoteData[$quoteID.'_pID'] = $parentObjectID;
if (!empty($fullQuote)) {
+ // strip quotes container in full quote
+ $htmlInputProcessor = new HtmlInputProcessor();
+ $htmlInputProcessor->processIntermediate($fullQuote);
+
+ $elements = $htmlInputProcessor->getHtmlInputNodeProcessor()->getDocument()->getElementsByTagName('blockquote');
+ while ($elements->length) {
+ DOMUtil::removeNode($elements->item(0));
+ }
+
$this->quotes[$objectType][$objectID][$quoteID] = 1;
- $this->quoteData[$quoteID.'_fq'] = $fullQuote;
+ $this->quoteData[$quoteID.'_fq'] = $htmlInputProcessor->getHtml();
}
$this->updateSession();