alecpl
2010-11-11 d2b27d11759cd1c668293a569aed1afaa7cfd741
- Fix displaying of text/plain messages containing HTML entities


1 files modified
10 ■■■■ changed files
program/include/main.inc 10 ●●●● patch | view | raw | blame | history
program/include/main.inc
@@ -556,10 +556,14 @@
      }
    else if ($mode=='remove')
      $str = strip_tags($str);
    $out = strtr($str, $encode_arr);
    // avoid douple quotation of &
    $out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr));
    // commented out, because this breaks displaying of text with entity strings
    // in text messages.
    //$out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', $out);
    return $newlines ? nl2br($out) : $out;
    }