Updated Branches:
  refs/heads/4.1 d3ffceb25 -> 00b2a99e7

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/00b2a99e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/00b2a99e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/00b2a99e

Branch: refs/heads/4.1
Commit: 00b2a99e7a4874d7e982f867dd1d6d54c02514ef
Parents: d3ffceb
Author: Jessica Wang <[email protected]>
Authored: Wed Feb 6 10:50:07 2013 -0800
Committer: Jessica Wang <[email protected]>
Committed: Wed Feb 6 10:50:07 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/00b2a99e/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('<br/>');
 
-                          $arrayElem.html(val);
+                          $arrayElem.html(_s(val));
                         } else {
-                          $arrayElem.html(_l(arrayValue));
+                          $arrayElem.html(_s(_l(arrayValue)));
                         }
 
                         $arrayElem.attr('title', 
_l(arrayValue).toString().replace('<br/>', ', '));
@@ -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();
                   }
                 });
               }

Reply via email to