Langfilter: Improve performance by using pre rendered content #1146

Merged
annando merged 1 commit from langfilter-speed into develop 2021-07-18 07:02:07 +02:00

View file

@ -117,7 +117,11 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
return;
}
if (!empty($hook_data['item']['rendered-html'])) {
$naked_body = strip_tags($hook_data['item']['rendered-html']);
} else {
$naked_body = BBCode::toPlaintext($hook_data['item']['body'], false);
}
// Don't filter if body lenght is below minimum
$minlen = DI::pConfig()->get(local_user(), 'langfilter', 'minlength', 32);