Permalink
Browse files

MDL-31745 blog: Fixed up encoding issue within blog

  • Loading branch information...
Rajesh Taneja Sam Hemelryk
Rajesh Taneja authored and Sam Hemelryk committed Mar 25, 2012
1 parent 8925a12 commit 038131c8b5614f18c14d964dc53b6960ae6c30d8
Showing with 5 additions and 6 deletions.
  1. +5 −6 blog/lib.php
View
@@ -672,7 +672,7 @@ function get_baseurl($filtertype, $filterselect) {
$querystring = '';
foreach($_GET as $var => $val) {
$var = clean_param($var, PARAM_ALPHANUM); // See MDL-22631
- $val = clean_param($val, PARAM_CLEAN);
+ $val = urlencode(clean_param($val, PARAM_CLEAN));
if(!$first) {
$first = true;
if ($var != 'filterselect' && $var != 'filtertype') {
@@ -683,23 +683,22 @@ function get_baseurl($filtertype, $filterselect) {
}
} else {
if ($var != 'filterselect' && $var != 'filtertype') {
- $querystring .= '&'.$var.'='.$val;
+ $querystring .= '&'.$var.'='.$val;
$hasparam = true;
}
}
}
if (isset($hasparam)) {
- $querystring .= '&';
+ $querystring .= '&';
} else {
$querystring = '?';
}
} else {
$querystring = '?';
}
- return strip_querystring(qualified_me()) . $querystring. 'filtertype='.
- $filtertype.'&filterselect='.$filterselect.'&';
-
+ return s(strip_querystring(qualified_me()) . $querystring. 'filtertype='.
+ $filtertype.'&filterselect='.$filterselect.'&', true);
}
/**

0 comments on commit 038131c

Please sign in to comment.