From f9dafbcdd648254b7b927cf3da61ab9be0b4f429 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Thu, 20 Jun 2013 13:11:02 +0800 Subject: [PATCH] Encode the provided top-level NS with utf8_encodeFN() (as is done in a couple of dozen other places in DW). Thanks to Ryuu and tosmatt. --- syntax.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/syntax.php b/syntax.php index fce3593..d19d546 100644 --- a/syntax.php +++ b/syntax.php @@ -165,11 +165,21 @@ function _makecombo($dest_ns) { return $ret; } + /** + * Get a list of namespaces below the given namespace. + * Recursively fetches subnamespaces. + * + * Includes inc/search.php + * @global array $conf Site configuration variables + * @uses utf8_encodeFN + * @param string $tns The top namespace + * @return array Multi-dimensional array of all namespaces below $tns + */ function _getnslist($tns = '') { require_once(DOKU_INC . 'inc/search.php'); global $conf; if ($tns == '') $tns = $conf['datadir']; - if (!is_dir($tns)) $tns = str_replace(':', '/', $tns); + if (!is_dir($tns)) $tns = utf8_encodeFN(str_replace(':', '/', $tns)); $data = array(); $exclude = $this->getConf('addpage_exclude');