From 9929696d62ac38368f04d405d7ed5a1031b59341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kl=C3=A4ser?= Date: Fri, 31 Mar 2017 01:48:49 +0200 Subject: [PATCH 2/2] Bug #44070: Fix representation of other image types than SVG --- management/univention-portal/debian/changelog | 6 ++++++ management/univention-portal/www/main.js | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/management/univention-portal/debian/changelog b/management/univention-portal/debian/changelog index e63805c..ddefc3e 100644 --- a/management/univention-portal/debian/changelog +++ b/management/univention-portal/debian/changelog @@ -1,3 +1,9 @@ +univention-portal (1.0.11-3) unstable; urgency=medium + + * Bug #44070: Fix representation of other image types than SVG + + -- Alexander Kläser Fri, 31 Mar 2017 01:47:51 +0200 + univention-portal (1.0.11-2) unstable; urgency=medium * Bug #44096: fix type error diff --git a/management/univention-portal/www/main.js b/management/univention-portal/www/main.js index e4797af..b8c8aa1 100644 --- a/management/univention-portal/www/main.js +++ b/management/univention-portal/www/main.js @@ -47,9 +47,9 @@ define([ "umc/i18n!portal" ], function(declare, lang, array, kernel, registry, on, dom, domConstruct, PortalCategory, tools, i18nTools, portalContent, installedApps, _) { - var _regEndsWithSVG = /\.svg$/; - var hasSVGSuffix = function(path) { - return path && _regEndsWithSVG.test(path); + var _regHasImageSuffix = /\.(svg|jpg|jpeg|png|gif)$/i; + var hasImageSuffix = function(path) { + return path && _regHasImageSuffix.test(path); }; var hasAbsolutePath = function(path) { @@ -115,7 +115,7 @@ define([ // just to make tools.getIconClass() leaving the URL untouched logo = window.location.origin + logo; - if (!hasSVGSuffix(logo)) { + if (!hasImageSuffix(logo)) { // an URL starting with http[s]:// needs also to have a .svg suffix logo = logo + '.svg'; } -- 2.7.4