function jabMarkdown($text, $safe = false) { global $jab; # Setup static parser variable. static $parser; if (!isset($parser)) { $parser = jabCreateMarkdownParser($safe); } if ($safe) { $text = str_replace("!!gt!!", ">", htmlspecialchars(str_replace(">", "!!gt!!", $text))); } $text = $parser->transform($text); return $text; }
function Format($bRss = false) { global $blog; jabRequire("markdown"); $parser = jabCreateMarkdownParser(false); $parser->local_link_prefix = "/" . $blog['routePrefix'] . "/"; if ($bRss) { $parser->root_link_prefix = "http://" . $_SERVER['HTTP_HOST']; } return $parser->transform($this->Content); }