Thanks for using 4.0 alpha and reporting the bugs in the forum.
go to components/com_comment/joscomment/utils.php
find following code
function setMaxLength($text, $_maxlength_text)
{
if (($_maxlength_text != -1) && (strlen($text) > $_maxlength_text))
$text = substr($text, 0, $_maxlength_text-3) . '...';
return $text;
}
change it to
function setMaxLength($text, $_maxlength_text)
{
if (($_maxlength_text != -1) && (mb_strlen($text) > $_maxlength_text))
$text = mb_substr($text, 0, $_maxlength_text-3) . '...';
return $text;
}
function text_cut($str, $no_words_ret)
{
// $str est la cha�ne � couper
// $no_words_ret est le nombre de mots qu'on souhaite en retour
static $tags = array ('div', 'span', 'b', 'u', 'i', 'a', 'ul', 'li');
$word_count = 0;
$pos = 0;
$str_len = strlen($str);
$str .= ' <';
$open_tags = array ();
while ($word_count < $no_words_ret && $pos < $str_len) {
$pos = min(strpos($str, ' ', $pos), strpos($str, '<', $pos));
if ($str[$pos] == '<') {
if ($str[$pos + 1] == '/') {
array_pop($open_tags);
$word_count++;
} else {
$sub = substr($str, $pos + 1, min(strpos($str, ' ', $pos), strpos($str, '>', $pos)) - $pos - 1);
if (in_array($sub, $tags)) {
array_push($open_tags, $sub);
}
}
$pos = strpos($str, '>', $pos) + 1;
} else {
$pos++;
$word_count++;
}
}
$str = substr($str, 0, $pos);
if (count($open_tags) > 0) {
foreach($open_tags as $value) {
$str .= '</' . array_pop($open_tags) . '>';
}
}
return($str);
}
[code]
change to
[code]
function text_cut($str, $no_words_ret)
{
// $str est la cha�ne � couper
// $no_words_ret est le nombre de mots qu'on souhaite en retour
static $tags = array ('div', 'span', 'b', 'u', 'i', 'a', 'ul', 'li');
$word_count = 0;
$pos = 0;
$str_len = mb_strlen($str);
$str .= ' <';
$open_tags = array ();
while ($word_count < $no_words_ret && $pos < $str_len) {
$pos = min(strpos($str, ' ', $pos), strpos($str, '<', $pos));
if ($str[$pos] == '<') {
if ($str[$pos + 1] == '/') {
array_pop($open_tags);
$word_count++;
} else {
$sub = mb_substr($str, $pos + 1, min(strpos($str, ' ', $pos), strpos($str, '>', $pos)) - $pos - 1);
if (in_array($sub, $tags)) {
array_push($open_tags, $sub);
}
}
$pos = strpos($str, '>', $pos) + 1;
} else {
$pos++;
$word_count++;
}
}
$str = mb_substr($str, 0, $pos);
if (count($open_tags) > 0) {
foreach($open_tags as $value) {
$str .= '</' . array_pop($open_tags) . '>';
}
}
return($str);
}
I believe that should be everything you need to make. Please tell us if it working