changed to use | instead of : in hex-ascii conversion

This commit is contained in:
hyung-hwan 2015-03-17 06:48:16 +00:00
parent 5e58b3eda2
commit 2702b84b81
3 changed files with 15 additions and 13 deletions

View File

@ -151,7 +151,7 @@ $config['subclass_prefix'] = 'MY_';
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_@\-!*';
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_@\-!*|';
/*

View File

@ -26,17 +26,19 @@ class Converter
// backslash to double backslashes.
$seg = '!!';
}
else if ($ascii[$i] == ':')
else if ($ascii[$i] == '|')
{
// colon to backslash-colon
$seg = '!:';
$seg = '!|';
}
else if ($ascii[$i] == '/')
{
// slash to colon
$seg = ':';
$seg = '|';
}
else if ($ascii[$i] == '.' || $ascii[$i] == '_' || $ascii[$i] == '-' || $ascii[$i] == ' ')
else if ($ascii[$i] == '.' || $ascii[$i] == '_' ||
$ascii[$i] == '-' || $ascii[$i] == ':' ||
$ascii[$i] == '@' || $ascii[$i] == ' ')
{
// no conversion for a period, an underscore, a dash, and a space
$seg = $ascii[$i];
@ -94,7 +96,7 @@ class Converter
$seg = $hex[$i];
}
}
else if ($hex[$i] == ':')
else if ($hex[$i] == '|')
{
// colon to slash
$seg = '/';

View File

@ -214,15 +214,16 @@ var asciiToHex = function (x,dir) {
{
seg = "!!";
}
else if (c == ":")
else if (c == "|")
{
seg = "!:";
seg = "!|";
}
else if (c == "/")
{
seg = ":";
seg = "|";
}
else if (c == "." || c == "_" || c == "-" || c == " ")
else if (c == "." || c == "_" || c == "-" ||
c == ":" || c == "@" || c == " ")
{
seg = c;
}
@ -241,7 +242,6 @@ var asciiToHex = function (x,dir) {
r += seg;
}
}
else
{