From: Matthew Exon Date: Tue, 31 Jan 2017 03:44:32 +0000 (+0000) Subject: Change $allowed_src_protocols to static X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96aadb23f8beb2b0ae453d9f4ba6bf9fc86ba1cd;p=friendica.git Change $allowed_src_protocols to static --- diff --git a/include/bbcode.php b/include/bbcode.php index 0f1a705faa..489ef8b2e3 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1164,7 +1164,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal $Text = preg_replace('/\<([^>]*?)(src|href)=(.*?)\&\;(.*?)\>/ism', '<$1$2=$3&$4>', $Text); // sanitizes src attributes (http and redir URLs for displaying in a web page, cid used for inline images in emails) - $allowed_src_protocols = array('http', 'redir', 'cid'); + static $allowed_src_protocols = array('http', 'redir', 'cid'); $Text = preg_replace('#<([^>]*?)(src)="(?!' . implode('|', $allowed_src_protocols) . ')(.*?)"(.*?)>#ism', '<$1$2=""$4 class="invalid-src" title="' . t('Invalid source protocol') . '">', $Text);