aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/url.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-10 16:00:52 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-10 16:00:52 +0000
commit37446557462b35b5c6690f7f8f739c4dd861b85b (patch)
treeef72ca9f73bf31583350af4cb174f1a6c0ff3bab /views/default/output/url.php
parentf40da8fcaaeb193b155f8e51081bcaef468d9770 (diff)
downloadelgg-37446557462b35b5c6690f7f8f739c4dd861b85b.tar.gz
elgg-37446557462b35b5c6690f7f8f739c4dd861b85b.tar.bz2
Admin area now uses standard submenu tools.
git-svn-id: http://code.elgg.org/elgg/trunk@5992 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/output/url.php')
-rw-r--r--views/default/output/url.php13
1 files changed, 9 insertions, 4 deletions
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 <a></a> tags
* @uses string $vars['text'] The string between the <a></a> 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 <a> 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']) {