6 public static function isUrlAllowed($url)
8 $urlDomain = parse_url($url, PHP_URL_HOST);
9 if (!in_array($urlDomain, $GLOBALS['phinde']['domains'])) {
15 public static function noSchema($url)
18 array('http://', 'https://'),
24 public static function addSchema($url)
26 if (substr($url, 0, 7) == 'http://'
27 || substr($url, 0, 8) == 'https://'
31 return 'http://' . $url;
34 public static function sanitizeTitle($str)
38 array("\r", "\n", ' ', ' '),
39 array('', ' ', ' ', ' '),
46 * Create a full URL with protocol and host name
48 * @param string $path Path to the file, with leading /
50 * @return string Full URL
52 public static function fullUrl($path = '/')
54 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
59 return $prot . '://' . $_SERVER['HTTP_HOST'] . $path;