Just got the error again- this time 2 errors of it occurring on line 4538 of template functions...otherwise line 810
kses again at line 4538:
$short2 = kses($short.'</p>', $allowed_tags);
The entire block of code...
function shortenContent($articlecontent, $shorten, $shortenindicator, $forceindicator=false) {
global $_user_tags;
if ($forceindicator || (mb_strlen($articlecontent) > $shorten)) {
$allowed_tags = getAllowedTags('allowed_tags');
$short = mb_substr($articlecontent, 0, $shorten);
$short2 = kses($short.'</p>', $allowed_tags);
if (($l2 = mb_strlen($short2)) < $shorten) {
$c = 0;
$l1 = $shorten;
$delta = $shorten-$l2;
while ($l2 < $shorten && $c++ < 5) {
$open = mb_strrpos($short, '<');
if ($open > mb_strrpos($short, '>')) {
$l1 = mb_strpos($articlecontent,'>',$l1+1)+$delta;
} else {
$l1 = $l1 + $delta;
}
$short = mb_substr($articlecontent, 0, $l1);
$short2 = kses($short.'</p>', $allowed_tags);
$l2 = mb_strlen($short2);
}
$shorten = $l1;
}
$short = truncate_string($articlecontent, $shorten, '');
// drop open tag strings
$open = mb_strrpos($short, '<');
if ($open > mb_strrpos($short, '>')) {
$short = mb_substr($short, 0, $open);
}
// drop unbalanced tags
// insert the elipsis
$i = strrpos($short, '</p>');
if (($i !== false) && ($i == mb_strlen($short) - 4)) {
$short = mb_substr($short, 0, -4).' '.$shortenindicator.'</p>';
} else {
$short .= ' '.$shortenindicator;
}
$short = trim(kses($short.'</p>', $allowed_tags));
return $short;
}
return $articlecontent;
}