From 96de014d52595e1e6d35f3dfc367253c65eca75d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 29 Aug 2012 19:42:24 -0300 Subject: [PATCH] Fix Javascript Injection bugs. --- wise-webapp/src/main/webapp/js/mindmapList.js | 19 ------------------- .../src/main/webapp/jsp/mindmapDetail.jsp | 8 ++++---- .../src/main/webapp/jsp/mindmapEmbed.jsp | 4 ++-- .../src/main/webapp/jsp/mindmapList.jsp | 2 +- .../src/main/webapp/jsp/mindmapPrint.jsp | 4 ++-- 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/wise-webapp/src/main/webapp/js/mindmapList.js b/wise-webapp/src/main/webapp/js/mindmapList.js index e78f7e7d..fd9815a4 100644 --- a/wise-webapp/src/main/webapp/js/mindmapList.js +++ b/wise-webapp/src/main/webapp/js/mindmapList.js @@ -1,22 +1,3 @@ -jQuery.fn.dataTableExt.oSort['es_date-asc'] = function (a, b) { - var esDatea = a.split('/'); - var esDateb = b.split('/'); - - var x = (esDatea[2] + esDatea[1] + esDatea[0]) * 1; - var y = (esDateb[2] + esDateb[1] + esDateb[0]) * 1; - - return ((x < y) ? -1 : ((x > y) ? 1 : 0)); -}; - -jQuery.fn.dataTableExt.oSort['es_date-desc'] = function (a, b) { - var esDatea = a.split('/'); - var esDateb = b.split('/'); - - var x = (esDatea[2] + esDatea[1] + esDatea[0]) * 1; - var y = (esDateb[2] + esDateb[1] + esDateb[0]) * 1; - - return ((x < y) ? 1 : ((x > y) ? -1 : 0)); -}; $.fn.dataTableExt.oApi.fnReloadAjax = function (oSettings, sNewSource, fnCallback, bStandingRedraw) { if (typeof sNewSource != 'undefined' && sNewSource != null) { diff --git a/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp b/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp index 4137a3c3..c0617375 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp @@ -12,12 +12,12 @@
    -
  • : ${mindmap.title}
  • -
  • : ${mindmap.description}
  • -
  • : ${mindmap.creator.fullName}
  • +
  • :
  • +
  • :
  • +
  • :
  • : ${mindmap.creationTime}
  • : ${mindmap.lastEditTime}
  • -
  • : ${mindmap.lastEditor}
  • +
  • :
  • : ${mindmap.starred}
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEmbed.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEmbed.jsp index 600f56da..4d5c5e6b 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEmbed.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEmbed.jsp @@ -78,8 +78,8 @@
- :${mindmap.creator.fullName} - :${mindmap.title} + : + :
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index 8bbabc57..75780f40 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -58,7 +58,7 @@ bUseRendered:false, mDataProp:"title", fnRender:function (obj) { - return '' + obj.aData.title + ''; + return $('').text(obj.aData.title).html(); } }, { diff --git a/wise-webapp/src/main/webapp/jsp/mindmapPrint.jsp b/wise-webapp/src/main/webapp/jsp/mindmapPrint.jsp index 5a2a8143..33280d54 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapPrint.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapPrint.jsp @@ -113,8 +113,8 @@
- :${mindmap.creator.fullName} - :${mindmap.title} + : + :