-
-
Save zeelot/50a7d11977a17aab2400 to your computer and use it in GitHub Desktop.
seems to work!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/classes/kohana/url.php b/classes/kohana/url.php | |
index e7e66bb..d95c7db 100644 | |
--- a/classes/kohana/url.php | |
+++ b/classes/kohana/url.php | |
@@ -112,13 +112,18 @@ class Kohana_URL { | |
if ( ! UTF8::is_ascii($path)) | |
{ | |
// Encode all non-ASCII characters, as per RFC 1738 | |
- $path = preg_replace('~([^/]+)~e', 'rawurlencode("$1")', $path); | |
+ $path = preg_replace_callback('~([^/]+)~', 'URL::_rawurlencode_callback', $path); | |
} | |
// Concat the URL | |
return URL::base($protocol, $index).$path; | |
} | |
+ protected static function _rawurlencode_callback($matches) | |
+ { | |
+ return rawurlencode($matches[0]); | |
+ } | |
+ | |
/** | |
* Merges the current GET parameters with an array of new or overloaded | |
* parameters and returns the resulting query string. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment