From 3a2caa07e52b58aee255640eaaa4b7f85b0b466f Mon Sep 17 00:00:00 2001 From: rk4n3 Date: Tue, 5 Jun 2018 10:16:45 -0500 Subject: [PATCH] Eliminate URL-encoding of root_namespace This allows use of a root namespace more than one level deep. Prior to this, use of e.g. `root:mantis` as namespace would result in a mangled dokuwiki URL because the colon was encoded to `%3A`. Fixes #24496 --- core/classes/MantisCoreWikiPlugin.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/classes/MantisCoreWikiPlugin.class.php b/core/classes/MantisCoreWikiPlugin.class.php index 4ca71fcb27..7737131e88 100644 --- a/core/classes/MantisCoreWikiPlugin.class.php +++ b/core/classes/MantisCoreWikiPlugin.class.php @@ -71,7 +71,7 @@ function base_url( $p_project_id = null ) { $t_namespace = plugin_config_get( 'root_namespace' ); if( !is_blank( $t_namespace ) ) { - $t_base .= urlencode( $t_namespace ) . ':'; + $t_base .= $t_namespace . ':'; } if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) { @@ -130,7 +130,7 @@ function base_url( $p_project_id = null ) { if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) { $t_base .= urlencode( project_get_name( $p_project_id ) ) . ':'; } else { - $t_base .= urlencode( plugin_config_get( 'root_namespace' ) ); + $t_base .= plugin_config_get( 'root_namespace' ); } return $t_base; } @@ -185,7 +185,7 @@ function base_url( $p_project_id = null ) { $t_namespace = plugin_config_get( 'root_namespace' ); if( !is_blank( $t_namespace ) ) { - $t_base .= urlencode( $t_namespace ) . '/'; + $t_base .= $t_namespace . '/'; } if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) { @@ -244,7 +244,7 @@ function base_url( $p_project_id = null ) { $t_namespace = ucfirst( plugin_config_get( 'root_namespace' ) ); if( !is_blank( $t_namespace ) ) { - $t_base .= urlencode( $t_namespace ); + $t_base .= $t_namespace; } if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) { @@ -303,7 +303,7 @@ function base_url( $p_project_id = null ) { if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) { $t_base .= urlencode( project_get_name( $p_project_id ) ) . '/'; } else { - $t_base .= urlencode( plugin_config_get( 'root_namespace' ) ); + $t_base .= plugin_config_get( 'root_namespace' ); } return $t_base; }