ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMWParserAdapter.php File Reference

Go to the source code of this file.

Data Structures

class  ilMWFakery
 
class  ilMWParserAdapter
 

Functions

 wfUrlProtocols ()
 Returns a regular expression of url protocols. More...
 

Variables

if(!function_exists("wfProfileIn")) if (!function_exists("wfProfileOut"))
 
const UTF8_REPLACEMENT "\xef\xbf\xbd"
 
 $GLOBALS ["wgContLang"] = new ilMWFakery()
 

Function Documentation

◆ wfUrlProtocols()

wfUrlProtocols ( )

Returns a regular expression of url protocols.

Returns
string

Definition at line 24 of file class.ilMWParserAdapter.php.

References GuzzleHttp\Psr7\$protocol.

Referenced by Parser\magicLinkCallback().

25 {
26  global $wgUrlProtocols;
27 
28  $wgUrlProtocols = array(
29  'http://',
30  'https://',
31  'ftp://',
32  'irc://',
33  'gopher://',
34  'telnet://', // Well if we're going to support the above.. -ævar
35  'nntp://', // @bug 3808 RFC 1738
36  'worldwind://',
37  'mailto:',
38  'news:'
39  );
40 
41 
42  // Support old-style $wgUrlProtocols strings, for backwards compatibility
43  // with LocalSettings files from 1.5
44  if (is_array($wgUrlProtocols)) {
45  $protocols = array();
46  foreach ($wgUrlProtocols as $protocol) {
47  $protocols[] = preg_quote($protocol, '/');
48  }
49 
50  return implode('|', $protocols);
51  } else {
52  return $wgUrlProtocols;
53  }
54 }
+ Here is the caller graph for this function:

Variable Documentation

◆ $GLOBALS

$GLOBALS["wgContLang"] = new ilMWFakery()

Definition at line 105 of file class.ilMWParserAdapter.php.

◆ if

if (!function_exists("wfProfileIn")) if(!function_exists("wfProfileOut"))

Definition at line 8 of file class.ilMWParserAdapter.php.

◆ UTF8_REPLACEMENT

const UTF8_REPLACEMENT "\xef\xbf\xbd"

Definition at line 17 of file class.ilMWParserAdapter.php.