Skip to content

Commit f7ffbbb

Browse files
committed
HTML encode strings in JSP
1 parent 15296c8 commit f7ffbbb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

blast/src/org/labkey/blast/view/jobDetails.jsp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@
7474
schemaName: 'blast',
7575
queryName: 'blast_jobs',
7676
filterArray: [
77-
LABKEY.Filter.create('objectid', <%=q(job.getObjectid())%>, LABKEY.Filter.Types.EQUAL)
77+
LABKEY.Filter.create('objectid', <%=q(h(job.getObjectid()))%>, LABKEY.Filter.Types.EQUAL)
7878
]
7979
}
8080
},{
8181
html: '<hr>'
8282
},{
8383
layout: 'hbox',
8484
border: false,
85-
hidden: !<%=hasRun%>,
85+
hidden: !<%=h(hasRun)%>,
8686
items: [{
8787
xtype: 'combo',
8888
fieldLabel: 'Choose Output Format',
@@ -92,7 +92,7 @@
9292
valueField: 'id',
9393
labelWidth: 150,
9494
width: 600,
95-
value: <%=q(outputFormat == null ? null : outputFormat.name())%>,
95+
value: <%=q(h(outputFormat == null ? null : outputFormat.name()))%>,
9696
store: {
9797
type: 'array',
9898
fields: ['label', 'id'],
@@ -123,7 +123,7 @@
123123
return;
124124
}
125125
126-
window.location = LABKEY.ActionURL.buildURL('blast', 'jobDetails', null, {outputFmt: fmt, jobId: <%=q(job.getObjectid())%>});
126+
window.location = LABKEY.ActionURL.buildURL('blast', 'jobDetails', null, {outputFmt: fmt, jobId: <%=q(h(job.getObjectid()))%>});
127127
}
128128
},{
129129
xtype: 'button',
@@ -139,7 +139,7 @@
139139
var newForm = Ext4.DomHelper.append(document.getElementsByTagName('body')[0],
140140
'<form method="POST" action="' + LABKEY.ActionURL.buildURL("blast", "downloadBlastResults") + '">' +
141141
'<input type="hidden" name="fileName" value="' + Ext4.htmlEncode('blastResults.txt') + '" />' +
142-
'<input type="hidden" name="jobId" value="' + <%=q(job.getObjectid())%> + '" />' +
142+
'<input type="hidden" name="jobId" value="' + <%=q(h(job.getObjectid()))%> + '" />' +
143143
'<input type="hidden" name="outputFormat" value="' + fmt + '" />' +
144144
'</form>');
145145
newForm.submit();
@@ -164,7 +164,7 @@
164164
165165
getResultItems: function(){
166166
var ret = [];
167-
if (!<%=hasRun%>){
167+
if (!<%=h(hasRun)%>){
168168
ret.push({
169169
xtype: 'panel',
170170
minHeight: 200,
@@ -191,13 +191,13 @@
191191
192192
Ext4.create('BLAST.panel.BlastDetailsPanel', {
193193
194-
}).render(<%=q(renderTarget)%>);
194+
}).render(<%=q(h(renderTarget))%>);
195195
});
196196
197197
</script>
198198

199-
<div id=<%=q(renderTarget)%>></div>
200-
<div id=<%=q(renderTarget + "_results")%>>
199+
<div id=<%=q(h(renderTarget))%>></div>
200+
<div id=<%=q(h(renderTarget + "_results"))%>>
201201
<%
202202
if (job.isHasRun())
203203
{

0 commit comments

Comments
 (0)