changed to use | instead of : in hex-ascii conversion
This commit is contained in:
		| @ -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~%.:_@\-!*|'; | ||||
|  | ||||
|  | ||||
| /* | ||||
|  | ||||
| @ -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 = '/'; | ||||
|  | ||||
| @ -197,7 +197,7 @@ var asciiToHex = function (x,dir) { | ||||
| 	{ | ||||
| 		var i; | ||||
| 		/* | ||||
| 		for(i = 0; i < x.length; i++) | ||||
| 		for(i=0; i<x.length; i++) | ||||
| 		{ | ||||
| 			var tmp = x.charCodeAt(i).toString(16); | ||||
| 			if (tmp.length == 1) r += "0"; | ||||
| @ -214,21 +214,22 @@ 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; | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				if (/^[A-Za-z0-9]$/.test(c)) | ||||
| 				if (/^[A-Za-z0-9]$/.test (c)) | ||||
| 				{ | ||||
| 					seg = c; | ||||
| 				} | ||||
| @ -241,7 +242,6 @@ var asciiToHex = function (x,dir) { | ||||
|  | ||||
| 			r += seg; | ||||
| 		} | ||||
| 		 | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
|  | ||||
		Reference in New Issue
	
	Block a user