[icinga-checkins] icinga.org: icinga-web/master: * Added uri encoding to url based renderers (fixes #2125)

git at icinga.org git at icinga.org
Tue Feb 21 10:38:02 CET 2012


Module: icinga-web
Branch: master
Commit: 5f1920f6dc5a4110b0dd85405ea49addb4678d69
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=5f1920f6dc5a4110b0dd85405ea49addb4678d69

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Tue Feb 21 10:06:32 2012 +0100

* Added uri encoding to url based renderers (fixes #2125)

---

 .../lib/js/grid/renderer/IcingaColumnRenderer.js   |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/app/modules/Cronks/lib/js/grid/renderer/IcingaColumnRenderer.js b/app/modules/Cronks/lib/js/grid/renderer/IcingaColumnRenderer.js
index 05abd97..31cac6d 100644
--- a/app/modules/Cronks/lib/js/grid/renderer/IcingaColumnRenderer.js
+++ b/app/modules/Cronks/lib/js/grid/renderer/IcingaColumnRenderer.js
@@ -77,7 +77,7 @@ Cronk.grid.IcingaColumnRenderer = {
         if (!'url' in cfg) {
             throw('url XTemplate configuration needed! (parameter name="url")');
         }
-
+        cfg.url = encodeURI(cfg.url);
         return function(grid, rowIndex, colIndex, e) {
             
             var url = Cronk.grid.ColumnRendererUtil.applyXTemplate(grid, rowIndex, cfg.url);
@@ -101,6 +101,8 @@ Cronk.grid.IcingaColumnRenderer = {
         if (!'url' in cfg) {
             throw('url XTemplate configuration needed! (parameter name="url")');
         }
+        
+        cfg.url = encodeURI(cfg.url);
         return function(grid, rowIndex, colIndex, e) {
             var url = Cronk.grid.ColumnRendererUtil.applyXTemplate(grid, rowIndex, cfg.url);
             var title = Cronk.grid.ColumnRendererUtil.applyXTemplate(grid, rowIndex, cfg.title);
@@ -151,6 +153,7 @@ Cronk.grid.IcingaColumnRenderer = {
         if (!'url' in cfg) {
             throw('url XTemplate configuration needed! (parameter name="url")');
         }
+        cfg.url = encodeURI(cfg.url);
         return function(grid, rowIndex, colIndex, e) {
             
             var url = Cronk.grid.ColumnRendererUtil.applyXTemplate(grid, rowIndex, cfg.url);





More information about the icinga-checkins mailing list