Example #1
0
function up($txt, $bbcode = 0)
{
    $txt = str_replace("& ", "& ", $txt);
    $txt = str_replace("\"", """, $txt);
    $txt = trim($txt);
    if (empty($bbcode)) {
        $txt = nl2br($txt);
    }
    $txt = spChars($txt);
    return $txt;
}
Example #2
0
function up($txt, $bbcode = 0, $charset = '')
{
    $txt = str_replace("& ", "& ", $txt);
    $txt = str_replace("\"", """, $txt);
    if (empty($bbcode)) {
        $txt = htmlentities(html_entity_decode($txt), ENT_QUOTES, $charset);
        $txt = nl2br($txt);
    }
    $txt = spChars($txt);
    return trim($txt);
}