summaryrefslogtreecommitdiff
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/config/config.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/application/config/config.php b/application/config/config.php
index d89e7774..4bece9a1 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -37,10 +37,13 @@
* So dirname doesn't work. So we do a tricky workaround where we look up the SCRIPT_FILENAME (in
* this case it'd be "index.php" and we delete from that part onwards. If you work at 1and1 and
* you're reading this, please fix this bug!
+ *
+ * Rawurlencode each of the elements to avoid breaking the page layout.
*/
$config["site_domain"] =
- substr($_SERVER["SCRIPT_NAME"], 0,
- strpos($_SERVER["SCRIPT_NAME"], basename($_SERVER["SCRIPT_FILENAME"])));
+ implode("/", array_map("rawurlencode", explode("/",
+ substr($_SERVER["SCRIPT_NAME"], 0,
+ strpos($_SERVER["SCRIPT_NAME"], basename($_SERVER["SCRIPT_FILENAME"]))))));
/**
* Force a default protocol to be used by the site. If no site_protocol is