private function _cleanUpUrl($url) { $url = Dase_Util::unhtmlspecialchars($url); //omit start param $url = preg_replace('/(\\?|&|&)start=[0-9]*/i', '', $url); //omit format param $url = preg_replace('/(\\?|&|&)format=\\w*/i', '', $url); //omit max param $url = preg_replace('/(\\?|&|&)max=[0-9]*/i', '', $url); //omit num param $url = preg_replace('/(\\?|&|&)num=\\w*/i', '', $url); //omit sort param $url = preg_replace('/(\\?|&|&)sort=\\w*/i', '', $url); //omit uid param //MAY NEED WORK ?? $url = preg_replace('/(\\?|&|&)uid=[^&]*/i', '', $url); //last param only PHP >= 5.2.3 //$url = htmlspecialchars($url,ENT_COMPAT,'UTF-8',false); //beware double encoding $url = Dase_Util::unhtmlspecialchars($url); $url = htmlspecialchars($url, ENT_COMPAT, 'UTF-8'); return $url; }