system/HTTP/URI.php
protected function decode(string $value): string
	{
		if (empty($value))
		{
			return $value;
		}

		$decoded = urldecode($value);

		// This won't catch all cases, specifically
		// changing ' ' to '+' has the same length
		// but doesn't really matter for our cases here.
		return strlen($decoded) < strlen($value) ? $decoded : $value;
	}
protected function decode(string $value): string
	{
		if (empty($value))
		{
			return $value;
		}

		$decoded = urldecode($value);

		// This won't catch all cases, specifically
		// changing ' ' to '+' has the same length
		// but doesn't really matter for our cases here.
		return strlen($decoded) < strlen($value) ? $decoded : $value;
	}
Checks the value to see if it has been urlencoded and decodes it if so.
The urlencode check is not perfect but should catch most cases.

@param string $value

@return string