3 if (!function_exists(
"wfProfileIn")) {
4 function wfProfileIn($dummy)
8 if (!function_exists(
"wfProfileOut")) {
9 function wfProfileOut($dummy)
14 include_once(
"./include/Unicode/UtfNormalUtil.php");
17 define(
'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;
56 include_once(
"./Services/Utilities/classes/Parser.php");
57 include_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();
markNoConversion($text, $noParse=false)
makeExternalLink($url, $text, $escape=true, $linktype='', $ns=null)
maybeMakeExternalImage($url)
Create styles array
The data for the language used.
wfUrlProtocols()
Returns a regular expression of url protocols.