3 if (!function_exists(
"wfProfileIn"))
5 function wfProfileIn($dummy)
9 if (!function_exists(
"wfProfileOut"))
11 function wfProfileOut($dummy)
16 include_once(
"./include/Unicode/UtfNormalUtil.php");
19 define(
'UTF8_REPLACEMENT',
"\xef\xbf\xbd" );
27 global $wgUrlProtocols;
29 $wgUrlProtocols =
array(
45 if ( is_array( $wgUrlProtocols ) ) {
47 foreach ($wgUrlProtocols as $protocol)
48 $protocols[] = preg_quote( $protocol,
'/' );
50 return implode(
'|', $protocols );
52 return $wgUrlProtocols;
56 include_once(
"./Services/Utilities/classes/Parser.php");
57 include_once(
"./Services/Utilities/classes/Sanitizer.php");
77 $urlpath = parse_url(
$url, PHP_URL_PATH);
78 $pi = pathinfo($urlpath);
79 if (in_array(strtolower($pi[
"extension"]),
array(
"jpg",
"jpeg",
"gif",
"png")))
81 return '<img src="'.$url.
'" border="0" />';
85 return '<a href="'.$url.
'" target="_blank" rel="noopener">'.
$text.
'</a>';
103 parent::__construct();
maybeMakeExternalImage( $url)
markNoConversion($text, $noParse=false)
Create styles array
The data for the language used.
makeExternalLink( $url, $text, $escape=true, $linktype='', $ns=null)
wfUrlProtocols()
Returns a regular expression of url protocols.