mirror of
https://github.com/friendica/friendica
synced 2024-11-11 09:02:55 +00:00
Simplify BBCode::toPlaintext
- Keep white spaces after tags
This commit is contained in:
parent
596b5b0982
commit
5f9fb1f14f
1 changed files with 1 additions and 1 deletions
|
@ -355,7 +355,7 @@ class BBCode extends BaseObject
|
|||
*/
|
||||
public static function toPlaintext($text, $keep_urls = true)
|
||||
{
|
||||
$naked_text = preg_replace('/\[(.+?)\]\s*/','', $text);
|
||||
$naked_text = preg_replace('/\[.+?\]/','', $text);
|
||||
if (!$keep_urls) {
|
||||
$naked_text = preg_replace('#https?\://[^\s<]+[^\s\.\)]#i', '', $naked_text);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue