public function asHtml(JBBCode\ElementNode $el) { $attribute = $el->getAttribute(); $content = ""; foreach ($el->getChildren() as $child) { $content .= $child->getAsHtml(); } if ($attribute == null) { return '<blockquote>' . $content . '</blockquote>'; } preg_match('/"(.*?)"]?$/i', $attribute, $matches); return '<blockquote>' . $content . '<footer>' . htmlspecialchars($matches[1]) . '</footer></blockquote>'; }
public function asHtml(JBBCode\ElementNode $el) { $result = "\nQuote from " . $el->getAttribute()["quote"] . ":\n"; foreach (preg_split("/\\R/", $this->getContent($el)) as $line) { $result .= "> " . $line . "\n"; } return $result . "\n"; }