diff --git a/inc/pageutils.php b/inc/pageutils.php index c10c1c4e892a94ef894401f2063d35bf33c19bee..4859465bbd4d7e0fb69d4b7fcf98bf997bcf6d7c 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -123,8 +123,13 @@ function getNS($id){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function noNS($id){ - return preg_replace('/.*:/','',$id); +function noNS($id) { + $pos = strrpos($id, ':'); + if ($pos!==false) { + return substr($id, $pos+1); + } else { + return $id; + } } /**