Fix Javascript Injection bugs.

This commit is contained in:
Paulo Gustavo Veiga 2012-08-29 19:42:24 -03:00
parent d54a689ace
commit 96de014d52
5 changed files with 9 additions and 28 deletions

View File

@ -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) {

View File

@ -12,12 +12,12 @@
<div class="tab-content">
<div class="tab-pane fade active in" id="general">
<ul class="unstyled">
<li><strong><spring:message code="NAME"/>:</strong> ${mindmap.title}</li>
<li><strong><spring:message code="DESCRIPTION"/>:</strong> ${mindmap.description}</li>
<li><strong><spring:message code="CREATOR"/>:</strong> ${mindmap.creator.fullName}</li>
<li><strong><spring:message code="NAME"/>:</strong> <c:out value="${mindmap.title}"/></li>
<li><strong><spring:message code="DESCRIPTION"/>:</strong> <c:out value="${mindmap.description}"/></li>
<li><strong><spring:message code="CREATOR"/>:</strong> <c:out value="${mindmap.creator.fullName}"/></li>
<li><strong><spring:message code="CREATION_TIME"/>:</strong> ${mindmap.creationTime}</li>
<li><strong><spring:message code="LAST_UPDATE"/>:</strong> ${mindmap.lastEditTime}</li>
<li><strong><spring:message code="LAST_UPDATE_BY"/>:</strong> ${mindmap.lastEditor}</li>
<li><strong><spring:message code="LAST_UPDATE_BY"/>:</strong> <c:out value="${mindmap.lastEditor}"/></li>
<li><strong> <spring:message code="STARRED"/>:</strong> ${mindmap.starred}</li>
</ul>
</div>

View File

@ -78,8 +78,8 @@
<div id="zoomOut" class="button"></div>
<div id="mapDetails">
<span class="title"><spring:message code="CREATOR"/>:</span><span>${mindmap.creator.fullName}</span>
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.title}</span>
<span class="title"><spring:message code="CREATOR"/>:</span><span><c:out value="${mindmap.creator.fullName}"/></span>
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span><c:out value="${mindmap.title}"/></span>
</div>
</div>
</div>

View File

@ -58,7 +58,7 @@
bUseRendered:false,
mDataProp:"title",
fnRender:function (obj) {
return '<a href="c/maps/' + obj.aData.id + '/edit">' + obj.aData.title + '</a>';
return $('<a href="c/maps/' + obj.aData.id + '/edit"></a>').text(obj.aData.title).html();
}
},
{

View File

@ -113,8 +113,8 @@
<div id="zoomIn" class="button"></div>
<div id="mapDetails">
<span class="title"><spring:message code="CREATOR"/>:</span><span>${mindmap.creator.fullName}</span>
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span>${mindmap.title}</span>
<span class="title"><spring:message code="CREATOR"/>:</span><span><c:out value="${mindmap.creator.fullName}"/></span>
<span class="title"><spring:message code="DESCRIPTION"/>:</span><span><c:out value="${mindmap.title}"/></span>
</div>
</div>
</div>