summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/common.php b/inc/common.php
index be369d28a..28b527633 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -311,7 +311,11 @@ function breadcrumbs() {
*
* This is run on a ID before it is outputted somewhere
* currently used to replace the colon with something else
- * on Windows systems and to have proper URL encoding
+ * on Windows (non-IIS) systems and to have proper URL encoding
+ *
+ * See discussions at https://github.com/splitbrain/dokuwiki/pull/84 and
+ * https://github.com/splitbrain/dokuwiki/pull/173 why we use a whitelist of
+ * unaffected servers instead of blacklisting affected servers here.
*
* Urlencoding is ommitted when the second parameter is false
*
@@ -322,7 +326,8 @@ function idfilter($id, $ue = true) {
if($conf['useslash'] && $conf['userewrite']) {
$id = strtr($id, ':', '/');
} elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
- $conf['userewrite']
+ $conf['userewrite'] &&
+ strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') === false
) {
$id = strtr($id, ':', ';');
}