mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:10:16 +00:00
Avoid proxyfying images that are removed or replaced later
This commit is contained in:
parent
a5176cb841
commit
90588ddb8e
5 changed files with 8 additions and 7 deletions
|
@ -433,6 +433,10 @@ class BBCode
|
|||
*/
|
||||
public static function toPlaintext($text, $keep_urls = true)
|
||||
{
|
||||
// Remove pictures in advance to avoid unneeded proxy calls
|
||||
$text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/ism", ' $2 ', $text);
|
||||
$text = preg_replace("/\[img.*?\[\/img\]/ism", ' ', $text);
|
||||
|
||||
$naked_text = HTML::toPlaintext(self::convert($text, false, 0, true), 0, !$keep_urls);
|
||||
|
||||
return $naked_text;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue