3if (!function_exists(
"wfProfileIn")) {
 
    4    function wfProfileIn($dummy)
 
    8if (!function_exists(
"wfProfileOut")) {
 
    9    function wfProfileOut($dummy)
 
   14include_once(
"./include/Unicode/UtfNormalUtil.php");
 
   17define(
'UTF8_REPLACEMENT', 
"\xef\xbf\xbd" );
 
   26    global $wgUrlProtocols;
 
   28    $wgUrlProtocols = array(
 
   44    if (is_array($wgUrlProtocols)) {
 
   47            $protocols[] = preg_quote(
$protocol, 
'/');
 
   50        return implode(
'|', $protocols);
 
   52        return $wgUrlProtocols;
 
   56include_once(
"./Services/Utilities/classes/Parser.php");
 
   57include_once(
"./Services/Utilities/classes/Sanitizer.php");
 
   80        $urlpath = parse_url(
$url, PHP_URL_PATH);
 
   81        $pi = pathinfo($urlpath);
 
   82        if (in_array(strtolower($pi[
"extension"]), array(
"jpg", 
"jpeg", 
"gif", 
"png"))) {
 
   83            return '<img src="' . 
$url . 
'" border="0" />';
 
   85            return '<a href="' . 
$url . 
'" target="_blank" rel="noopener">' . 
$text . 
'</a>';
 
  111        parent::__construct();
 
An exception for terminatinating execution or to throw for unit testing.
wfUrlProtocols()
Returns a regular expression of url protocols.
markNoConversion($text, $noParse=false)
makeExternalLink($url, $text, $escape=true, $linktype='', $ns=null)
maybeMakeExternalImage($url)
make an image if it's allowed, either through the global option or through the exception