From 37446557462b35b5c6690f7f8f739c4dd861b85b Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 10 May 2010 16:00:52 +0000 Subject: Admin area now uses standard submenu tools. git-svn-id: http://code.elgg.org/elgg/trunk@5992 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/output/url.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'views/default/output') diff --git a/views/default/output/url.php b/views/default/output/url.php index 87d3a68a1..19ad331e1 100644 --- a/views/default/output/url.php +++ b/views/default/output/url.php @@ -10,7 +10,8 @@ * * @uses string $vars['href'] The string to display in the tags * @uses string $vars['text'] The string between the tags. - * @uses bool $vars['target'] Set the target="" attribute. + * @uses string $vars['target'] Set the target="" attribute. + * @uses bool $vars['encode_text'] Run $vars['text'] through htmlentities()? * @uses string $vars['class'] what to add in class="" * @uses string $vars['js'] Javascript to insert in tag * @uses bool $vars['is_action'] Is this a link to an action? @@ -39,13 +40,17 @@ if (!empty($url)) { } if (array_key_exists('text', $vars) && $vars['text']) { - $text = htmlentities($vars['text'], ENT_QUOTES, 'UTF-8'); + if (isset($vars['encode_text']) && $vars['encode_text']) { + $text = htmlentities($vars['text'], ENT_QUOTES, 'UTF-8'); + } else { + $text = $vars['text']; + } } else { $text = htmlentities($url, ENT_QUOTES, 'UTF-8'); } - if ((substr_count($url, "http://") == 0) && (substr_count($url, "https://") == 0)) { - $url = "http://" . $url; + if ((substr_count($url, "http://") == 0) && (substr_count($url, "https://") == 0)) { + $url = "http://" . $url; } if (array_key_exists('is_action', $vars) && $vars['is_action']) { -- cgit v1.2.3