From: Hypolite Petovan Date: Thu, 5 Apr 2018 11:59:57 +0000 (-0400) Subject: Revert "Added support of alt texts in images" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4997ccd3df3a5ad8fe7f3a15ced2691ee2ba670b;p=friendica.git Revert "Added support of alt texts in images" --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 40fb182fa1..5b0aa2cff6 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1718,14 +1718,6 @@ class BBCode extends BaseObject $text ); - $text = preg_replace_callback("/\[img\=([$URLSearchString]*)\](.*?)\[\/img\]/ism", - function ($matches) { - $matches[1] = proxy_url($matches[1]); - $matches[2] = htmlspecialchars($matches[2], ENT_COMPAT); - return '' . $matches[2] . ''; - }, - $text); - $text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '', $text); $text = preg_replace("/\[zmg\=([0-9]*)x([0-9]*)\](.*?)\[\/zmg\]/ism", '', $text); @@ -1860,12 +1852,10 @@ class BBCode extends BaseObject $text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'self::unescapeNoparseCallback', $text); $text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'self::unescapeNoparseCallback', $text); - /// @todo What is the meaning of these lines? + $text = preg_replace('/\[\&\;([#a-z0-9]+)\;\]/', '&$1;', $text); $text = preg_replace('/\&\#039\;/', '\'', $text); - - // Currently deactivated, it made problems with " inside of alt texts. - //$text = preg_replace('/\"\;/', '"', $text); + $text = preg_replace('/\"\;/', '"', $text); // fix any escaped ampersands that may have been converted into links $text = preg_replace('/\<([^>]*?)(src|href)=(.*?)\&\;(.*?)\>/ism', '<$1$2=$3&$4>', $text);