aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/input.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-08 20:49:45 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-01-08 20:49:45 +0000
commitbb4f01a334c5e8e50b25e21a9b5d2593f9a0b9e1 (patch)
tree6489893a3bf9a6c0458b1ca6ba231b5bd7821bc2 /engine/lib/input.php
parent627c1feda5e45c4c0c6cbbc944563d9fc868e8c9 (diff)
downloadelgg-bb4f01a334c5e8e50b25e21a9b5d2593f9a0b9e1.tar.gz
elgg-bb4f01a334c5e8e50b25e21a9b5d2593f9a0b9e1.tar.bz2
Fixes #1172: URL now checked for trailing slash upon installation.
git-svn-id: http://code.elgg.org/elgg/trunk@3787 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/input.php')
-rw-r--r--engine/lib/input.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index abc2d6811..f59061312 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -14,7 +14,7 @@
*
* Note: this function does not handle nested arrays (ex: form input of param[m][n])
* because of the filtering done in htmlawed from the filter_tags call.
- *
+ *
* @param $variable string The variable we want to return.
* @param $default mixed A default value for the variable if it is not found.
* @param $filter_result If true then the result is filtered for bad tags.
@@ -52,7 +52,7 @@ function get_input($variable, $default = "", $filter_result = true) {
/**
* Sets an input value that may later be retrieved by get_input
- *
+ *
* Note: this function does not handle nested arrays (ex: form input of param[m][n])
*
* @param string $variable The name of the variable
@@ -96,7 +96,8 @@ function sanitise_filepath($path) {
// Sort trailing slash
$path = trim($path);
- $path = rtrim($path, " /");
+ // rtrim defaults plus /
+ $path = rtrim($path, " \n\t\0\x0B/");
$path = $path . "/";
return $path;