From be5ae6c44f8fae9364c0be65f4f685d7c1afa104 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Mon, 3 Nov 2014 21:13:07 +0100 Subject: [PATCH] Support HTML in logo claim --- core/templates/layout.user.php | 2 +- lib/private/defaults.php | 12 ++++++++++++ lib/public/defaults.php | 8 ++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 9f94344b21..f7f2b3dc73 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -49,7 +49,7 @@ if(OC_Util::getEditionString() === '') { p(!empty($_['application'])?$_['application']: $l->t('Apps')); } else { - p($theme->getName()); + print_unescaped($theme->getHTMLName()); } ?> diff --git a/lib/private/defaults.php b/lib/private/defaults.php index cc6c819f03..c16ebdbe24 100644 --- a/lib/private/defaults.php +++ b/lib/private/defaults.php @@ -156,6 +156,18 @@ class OC_Defaults { } } + /** + * Returns the short name of the software containing HTML strings + * @return string title + */ + public function getHTMLName() { + if ($this->themeExist('getHTMLName')) { + return $this->theme->getHTMLName(); + } else { + return $this->defaultName; + } + } + /** * Returns entity (e.g. company name) - used for footer, copyright * @return string entity name diff --git a/lib/public/defaults.php b/lib/public/defaults.php index 9af31245ff..662071a29a 100644 --- a/lib/public/defaults.php +++ b/lib/public/defaults.php @@ -97,6 +97,14 @@ class Defaults { return $this->defaults->getName(); } + /** + * name of your ownCloud instance containing HTML styles + * @return string + */ + public function getHTMLName() { + return $this->defaults->getHTMLName(); + } + /** * Entity behind your onwCloud instance * @return string