Permalink
Browse files

Revert "Don’t urlencode '@2x', to have pretty IRIs (≈UTF8 URLs) in th…

…e browser address bar."

This reverts commit cbac286.
  • Loading branch information...
nedbaldessin committed Apr 5, 2017
1 parent cbac286 commit c918ab1da8db5ee94c97b2f29d0583ebfb1b0a81
Showing with 0 additions and 7 deletions.
  1. +0 −2 engine/application/libraries/Filebrowser.php
  2. +0 −5 engine/application/libraries/Subfolio.php
@@ -492,13 +492,11 @@ public function get_link($name) {
if ($this->folder == "") {
$link = "/".urlencode($name);
$link = str_replace('%2F', '/', $link);
- $link = str_replace('%40', '@', $link);
$link = Filebrowser::double_encode_specialcharacters($link);
} else {
$link = "/".urlencode($this->folder)."/".urlencode($name);
// unencode '/'
$link = str_replace('%2F', '/', $link);
- $link = str_replace('%40', '@', $link);
$link = Filebrowser::double_encode_specialcharacters($link);
}
return $link;
@@ -1358,7 +1358,6 @@ public function parent_link($name) {
if ($ff <> '') {
$parent_link = urlencode(dirname($ff));
$parent_link = str_replace('%2F', '/', $parent_link);
- $parent_link = str_replace('%40', '@', $parent_link);
// ## HACK FOR SLIDE
if (substr($parent_link, -6) == ".slide") {
$parent_link = substr($parent_link, 0, stripos($parent_link, '/'));
@@ -1382,7 +1381,6 @@ public function previous_link_or_span($name, $directory_name, $link_id, $class)
if ($prev <> "") {
$link = Filebrowser::double_encode_specialcharacters(urlencode($prev->name));
$link = str_replace('%2F', '/', $link);
- $link = str_replace('%40', '@', $link);
return "<a id='$link_id' href='$link'>$name</a>";
} else {
return "<span id='$link_id' class='".$class."'>".$name."</span>";
@@ -1398,7 +1396,6 @@ public function previous_link_or_span($name, $directory_name, $link_id, $class)
if ($prev <> "") {
$link = Filebrowser::double_encode_specialcharacters(urlencode($prev->name));
$link = str_replace('%2F', '/', $link);
- $link = str_replace('%40', '@', $link);
return "<a id='$link_id' href='$link'>$directory_name</a>";
} else {
@@ -1422,7 +1419,6 @@ public function next_link_or_span($name, $directory_name, $link_id, $class) {
if ($next <> "") {
$link = Filebrowser::double_encode_specialcharacters(urlencode($next->name));
$link = str_replace('%2F', '/', $link);
- $link = str_replace('%40', '@', $link);
return "<a id='$link_id' href='$link'>$name</a>";
} else {
return "<span id='$link_id' class='".$class."'>".$name."</span>";
@@ -1438,7 +1434,6 @@ public function next_link_or_span($name, $directory_name, $link_id, $class) {
if ($next <> "") {
$link = Filebrowser::double_encode_specialcharacters(urlencode($next->name));
$link = str_replace('%2F', '/', $link);
- $link = str_replace('%40', '@', $link);
return "<a id='$link_id' href='$link'>$directory_name</a>";
} else {

0 comments on commit c918ab1

Please sign in to comment.