Forum Replies Created

Viewing 1 replies (of 1 total)
  • I have the same problem but i try to resolve this and i found a php function that replace some special characters, i undestood why. I resolve the problem in this way, but i don’t know if it is totally correct but it works (if you know ph check and reply to me please). The function is functions-formatting.php you need find this :

    if (strpos($curl,'<!–‘) === false && strpos($curl,’–>’) === false) { // heck if is a HTML commnt
    if (isset($curl{0}) && ‘<‘ != $curl{0} && $next) { // If it’s not a tag
    $curl = str_replace(‘—‘, ‘—’, $curl);
    $curl = preg_replace(‘/(\s)–(\s)/’, ‘$1—$2’, $curl);
    $curl = str_replace(‘–‘, ‘–’, $curl);
    $curl = str_replace(‘…’, ‘…’, $curl);
    $curl = str_replace(‘‘, ‘“’, $curl);
    // This is a hack, look at this more later. It works pretty well though.
    $cockney = array(“’tain’t”,”’twere”,”’twas”,”’tis”,”’twill”,”’til”,”’bout”,”’nuff”,”’round”);
    $cockneyreplace = array(“’tain’t”,”’twere”,”’twas”,”’tis”,”’twill”,”’til”,”’bout”,”’nuff”,”’round”);
    $curl = str_replace($cockney, $cockneyreplace, $curl);
    $curl = preg_replace(“/’s/”, ‘’s’, $curl);
    $curl = preg_replace(“/'(\d\d(?:’|’)?s)/”, “’$1”, $curl);
    $curl = preg_replace(‘/(\s|\A|”)\’/’, ‘$1‘’, $curl);
    $curl = preg_replace(‘/(\d+)”/’, ‘$1″’, $curl);
    $curl = preg_replace(“/(\d+)’/”, ‘$1′’, $curl);
    $curl = preg_replace(“/(\S)'([^’\s])/”, “$1’$2”, $curl);
    $curl = preg_replace(‘/(\s|\A)”(?!\s)/’, ‘$1“$2’, $curl);
    $curl = preg_replace(‘/”(\s|\S|\Z)/’, ‘”$1’, $curl);
    $curl = preg_replace(“/'([\s.]|\Z)/”, ‘’$1′, $curl);
    $curl = preg_replace(“/ \(tm\)/i”, ‘ ™’, $curl);
    $curl = str_replace(“””, ‘”’, $curl);
    $curl = preg_replace(‘/(d+)x(\d+)/’, “$1×$2”, $curl);
    } elseif (strstr($curl, ‘<code’) || strstr($curl, ‘<pre’) || strstr($curl, ‘<kbd’) || strstr($curl, ‘<style’) || strstr($curl, ‘<script’)) {// strstr is fast
    $next = false;
    } else {
    $next = true;
    }

    Ok now you need replace with this:

    if (strpos($curl,'<!–‘) === false && strpos($curl,’–>’) === false) { // check if is a HTML commnt

    if (isset($curl{0}) && ‘<‘ != $curl{0} && $next) { // If it’s not a tag
    $curl = str_replace(‘—‘, ‘—’, $curl);
    $curl = preg_replace(‘/(\s)–(\s)/’, ‘$1—$2’, $curl);
    $curl = str_replace(‘–‘, ‘–’, $curl);
    $curl = str_replace(‘…’, ‘…’, $curl);
    $curl = str_replace(‘‘, ‘“’, $curl);

    // This is a hack, look at this more later. It works pretty well though.
    $cockney = array(“’tain’t”,”’twere”,”’twas”,”’tis”,”’twill”,”’til”,”’bout”,”’nuff”,”’round”);
    $cockneyreplace = array(“’tain’t”,”’twere”,”’twas”,”’tis”,”’twill”,”’til”,”’bout”,”’nuff”,”’round”);
    $curl = str_replace($cockney, $cockneyreplace, $curl);

    $curl = preg_replace(“/’s/”, ‘’s’, $curl);
    $curl = preg_replace(“/'(\d\d(?:’|’)?s)/”, “’$1”, $curl);
    $curl = preg_replace(‘/(\s|\A|”)\’/’, ‘$1‘’, $curl);
    $curl = preg_replace(‘/(\d+)”/’, ‘$1″’, $curl);
    $curl = preg_replace(“/(\d+)’/”, ‘$1′’, $curl);
    $curl = preg_replace(“/(\S)'([^’\s])/”, “$1’$2”, $curl);
    $curl = preg_replace(‘/(\s|\A)”(?!\s)/’, ‘$1“$2’, $curl);
    $curl = preg_replace(‘/”(\s|\S|\Z)/’, ‘”$1’, $curl);
    $curl = preg_replace(“/'([\s.]|\Z)/”, ‘’$1′, $curl);
    $curl = preg_replace(“/ \(tm\)/i”, ‘ ™’, $curl);
    $curl = str_replace(“””, ‘”’, $curl);
    $curl = preg_replace(‘/(d+)x(\d+)/’, “$1×$2”, $curl);

    } elseif (strstr($curl, ‘<code’) || strstr($curl, ‘<pre’) || strstr($curl, ‘<kbd’) || strstr($curl, ‘<style’) || strstr($curl, ‘<script’)) {
    // strstr is fast
    $next = false;
    } else {
    $next = true;
    }
    }

Viewing 1 replies (of 1 total)