function stringToHtml($s) { $s = Texy::unescapeHtml($s); $blocks = explode(TEXY_CONTENT_BLOCK, $s); foreach ($this->postHandlers as $name => $handler) { if (empty($this->allowed[$name])) { continue; } foreach ($blocks as $n => $s) { if ($n % 2 === 0 && $s !== '') { $blocks[$n] = call_user_func($handler, $s); } } } $s = implode(TEXY_CONTENT_BLOCK, $blocks); $s = Texy::escapeHtml($s); $s = $this->unProtect($s); $this->invokeHandlers('postProcess', array($this, &$s)); $s = Texy::unfreezeSpaces($s); return $s; }