Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A18EFE4F9 for ; Wed, 6 Feb 2013 18:43:21 +0000 (UTC) Received: (qmail 31105 invoked by uid 500); 6 Feb 2013 18:43:21 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 31083 invoked by uid 500); 6 Feb 2013 18:43:21 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 31076 invoked by uid 99); 6 Feb 2013 18:43:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 18:43:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 37A8824297; Wed, 6 Feb 2013 18:43:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jessicawang@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: refs/heads/master - CLOUDSTACK-1166: cloudstack UI - dashboard - sanitize content before setting it to a HTML element. Message-Id: <20130206184321.37A8824297@tyr.zones.apache.org> Date: Wed, 6 Feb 2013 18:43:21 +0000 (UTC) Updated Branches: refs/heads/master 7330deeb2 -> 01d7fa4be CLOUDSTACK-1166: cloudstack UI - dashboard - sanitize content before setting it to a HTML element. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/01d7fa4b Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/01d7fa4b Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/01d7fa4b Branch: refs/heads/master Commit: 01d7fa4bed803c2b8fff10b4f50429325bc46c25 Parents: 7330dee Author: Jessica Wang Authored: Wed Feb 6 10:42:35 2013 -0800 Committer: Jessica Wang Committed: Wed Feb 6 10:42:35 2013 -0800 ---------------------------------------------------------------------- ui/scripts/ui-custom/dashboard.js | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/01d7fa4b/ui/scripts/ui-custom/dashboard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui-custom/dashboard.js b/ui/scripts/ui-custom/dashboard.js index 2d81421..960d100 100644 --- a/ui/scripts/ui-custom/dashboard.js +++ b/ui/scripts/ui-custom/dashboard.js @@ -88,9 +88,9 @@ val.substring(0, concatValue).concat('...') : val; }).toArray().join('
'); - $arrayElem.html(val); + $arrayElem.html(_s(val)); } else { - $arrayElem.html(_l(arrayValue)); + $arrayElem.html(_s(_l(arrayValue))); } $arrayElem.attr('title', _l(arrayValue).toString().replace('
', ', ')); @@ -98,7 +98,7 @@ }); }); - $li.attr({ title: _l(item.description) }); + $li.attr({ title: _s(_l(item.description)) }); $li.fadeIn(); }); @@ -108,7 +108,7 @@ if ($item.hasClass('chart-line')) { $item.show().animate({ width: value + '%' }); } else { - $item.hide().html(value).fadeIn(); + $item.hide().html(_s(value)).fadeIn(); } }); }