コード例 #1
1
function parse_raw_html($text)
{
    global $Entity, $FlgChr;
    static $in_html = 0;
    static $buffer = '';
    if ($in_html) {
        if (strtolower($text) == "</html>\n") {
            $Entity[count($Entity)] = array('raw', $buffer);
            $buffer = '';
            $in_html = 0;
            return $FlgChr . (count($Entity) - 1) . $FlgChr;
        }
        // the following str-replace gards agains css or script in the html
        $buffer = $buffer . parse_elements(str_replace(array('<script', '</script'), array('&lt;script', '&lt;/script'), $text));
        return '';
    } else {
        if (strtolower($text) == "<html>\n") {
            $in_html = 1;
            return '';
        }
        return $text;
    }
}
コード例 #2
0
function view_macro_reflist($args)
{
    return parse_elements(new_entity(array("reflist", $args)));
}
コード例 #3
0
ファイル: transforms.php プロジェクト: apenwarr/gracefultavi
function parse_raw_html($text)
{
    global $Entity, $FlgChr;
    static $in_html = 0;
    static $buffer = '';
    if ($in_html) {
        if (strtolower($text) == "</html>\n") {
            $Entity[count($Entity)] = array('raw', $buffer);
            $buffer = '';
            $in_html = 0;
            return $FlgChr . (count($Entity) - 1) . $FlgChr;
        }
        $buffer = $buffer . parse_elements($text);
        return '';
    } else {
        if (strtolower($text) == "<html>\n") {
            $in_html = 1;
            return '';
        }
        return $text;
    }
}