mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-27 07:33:41 +00:00
# [#23292] Unicode slugs lets Upper case in url, which can cause issues when SEF is on
git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@19459 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
This commit is contained in:
parent
87c19b7f33
commit
3bc28cd5cd
|
@ -200,10 +200,10 @@ class JRouterSite extends JRouter
|
|||
$items = array_reverse($menu->getMenu());
|
||||
|
||||
$found = false;
|
||||
$route_lowercase = JString::strtolower($route);
|
||||
foreach ($items as $item) {
|
||||
$length = strlen($item->route); //get the length of the route
|
||||
|
||||
if ($length > 0 && strpos($route.'/', $item->route.'/') === 0 && $item->type != 'menulink') {
|
||||
if ($length > 0 && JString::strpos($route_lowercase.'/', $item->route.'/') === 0 && $item->type != 'menulink') {
|
||||
$route = substr($route, $length);
|
||||
if ($route) {
|
||||
$route = substr($route, 1);
|
||||
|
|
|
@ -27,6 +27,9 @@ $ -> Language fix or change
|
|||
- -> Removed
|
||||
! -> Note
|
||||
|
||||
13-Nov-2010 Jean-Marie Simonet
|
||||
# [#23292] Unicode slugs lets Upper case in url, which can cause issues when SEF is on
|
||||
|
||||
12-Nov-2010 Jean-Marie Simonet
|
||||
$ Deleted some redundant ini string
|
||||
|
||||
|
|
|
@ -122,8 +122,8 @@ class JFilterOutput
|
|||
//delete all '?'
|
||||
$str = str_replace('?', '', $str);
|
||||
|
||||
//trim white spaces at beginning and end of alias
|
||||
$str = trim( $str );
|
||||
//trim white spaces at beginning and end of alias, make lowercase
|
||||
$str = trim(JString::strtolower($str));
|
||||
|
||||
// remove any duplicate whitespace and replace whitespaces by hyphens
|
||||
$str =preg_replace('#\x20+#','-', $str);
|
||||
|
|
Loading…
Reference in New Issue
Block a user