Example #1
0
function cleanup()
{
    //include_once 'class.jevix.php';
    $jevix = new Jevix();
    $jevix->cfgAllowTags(array('a', 'img', 'i', 'b', 'u', 'em', 'strong', 'sup', 'br'));
    $jevix->cfgSetTagShort(array('br', 'img'));
    $jevix->cfgSetTagCutWithContent(array('script', 'object', 'iframe', 'style'));
    $jevix->cfgAllowTagParams('a', array('title', 'href'));
    $jevix->cfgAllowTagParams('img', array('src', 'alt' => '#text'));
    $jevix->cfgSetTagParamsRequired('img', 'src');
    $jevix->cfgSetTagParamsRequired('a', 'href');
    $jevix->cfgSetTagParamsAutoAdd('a', array('target' => '_blank'));
    $jevix->cfgSetAutoReplace(array('+/-', '(c)', '(r)', '&'), array('±', '©', '®', '&'));
    $jevix->cfgSetXHTMLMode(true);
    $jevix->cfgSetAutoBrMode(true);
    $jevix->cfgSetAutoLinkMode(false);
    $errors = null;
    if (isset($_POST)) {
        foreach ($_POST as $key => $value) {
            if (!is_array($value)) {
                $_POST[$key] = $jevix->parse($value, $errors);
            }
        }
    }
    if (isset($_GET)) {
        foreach ($_GET as $key => $value) {
            $_GET[$key] = $jevix->parse($value, $errors);
        }
    }
    if (isset($_COOKIE)) {
        foreach ($_COOKIE as $key => $value) {
            $_COOKIE[$key] = $jevix->parse($value, $errors);
        }
    }
    unset($jevix);
}