From 9f04fef3e046d7b4778ddf449589c9b1a3a67857 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 30 Mar 2009 18:09:17 +0000 Subject: Updated to r807 --- kohana/helpers/html.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'kohana/helpers/html.php') diff --git a/kohana/helpers/html.php b/kohana/helpers/html.php index daf16a04..375baf38 100644 --- a/kohana/helpers/html.php +++ b/kohana/helpers/html.php @@ -49,6 +49,18 @@ class html_Core { return $str; } + /** + * Perform a html::specialchars() with additional URL specific encoding. + * + * @param string string to convert + * @param boolean encode existing entities + * @return string + */ + public static function specialurlencode($str, $double_encode = TRUE) + { + return str_replace(' ', '%20', html::specialchars($str, $double_encode)); + } + /** * Create HTML link anchors. * @@ -80,7 +92,7 @@ class html_Core { return // Parsed URL - '' // Title empty? Use the parsed URL @@ -100,7 +112,7 @@ class html_Core { { return // Base URL + URI = full URL - '' // Title empty? Use the filename part of the URI -- cgit v1.2.3