)s', array($this, 'markupInlineImageBlock'), $text); } public function markupInlineImageBlock($matches) { $engine = $this->getEngine(); $text = $matches[1]; $element = new SimpleXMLElement(""); $attributes = array(); foreach($element->attributes() as $k => $v) { $attributes[$k] = $v; } $source_body = phutil_tag('img', $attributes); return $engine->storeText($source_body); } }