mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-23 00:30:21 +00:00
Langfilter: Improve performance by using pre rendered content
This commit is contained in:
parent
74ea687c2e
commit
dc81a5cf5f
1 changed files with 5 additions and 1 deletions
|
@ -117,7 +117,11 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
|
|||
return;
|
||||
}
|
||||
|
||||
$naked_body = BBCode::toPlaintext($hook_data['item']['body'], false);
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue