Location: PHPKode > projects > WikyBlog > include/tool/WBredir.php
<?php

	defined('WikyBlog') or die("Not an entry point...");

	$empty = array('root'=>'','title'=>'');
	if( isset($_POST['wbRedir']) ){
		$_POST += $empty;
		$path = $_POST['root'].$_POST['title'];
	}else{
		$_GET += $empty;
		$path = $_GET['root'].$_GET['title'];
	}
	$path =	$GLOBALS['wbLinkPrefix'].$path;

	
// 	$path = str_replace(array('\\','../','./'),array('/',''),$path);
// 	if($pos = strpos($path,'?')){
// 		$path = substr($path,0,$pos);
// 	}
// 	$_SERVER['REDIRECT_URL'] = $path;
	

	//
	//	new
	//
	$path = wbStr_replace('\\','/',$path);
	$path = wbStr_replace('../','',$path);
	$path = wbStr_replace('./','',$path);
	if($pos = wbStrpos($path,'?')){
		$path = wbSubstr($path,0,$pos);
	}
	$_SERVER['REDIRECT_URL'] = $path;
	
	
	
Return current item: WikyBlog