@@ -57,21 +57,21 @@ if ($this->job->getStatus() == MIDAS_REMOTEPROCESSING_STATUS_DONE) {
57
57
}
58
58
?>
59
59
60
- <h4>Job Status: <?php echo $ jobStatus ?> </h4>
60
+ <h4>Job Status: <?php echo $ this -> escape ( $ jobStatus); ?> </h4>
61
61
62
62
<?php
63
63
if ($ this ->executable != false ) {
64
64
?>
65
65
<h4>Executable:
66
- <a href="<?php echo $ this ->webroot ?> /item/<?php echo $ this ->executable ->getKey (
67
- ) ?> "><?php echo $ this ->executable ->getName () ?> </a>
66
+ <a href="<?php echo $ this ->webroot ?> /item/<?php echo $ this ->escape ( $ this -> executable ->getKey (
67
+ )); ?> "><?php echo $ this ->escape ( $ this -> executable ->getName ()); ?> </a>
68
68
</h4>
69
69
<?php
70
70
}
71
71
if ($ this ->log != false ) {
72
72
?>
73
73
<a id="showLogLink">Toggle raw xml results</a><br/>
74
- <pre id="hiddenLog"><?php echo htmlentities ($ this ->log ) ?> </pre>
74
+ <pre id="hiddenLog"><?php echo $ this -> escape ($ this ->log ) ?> </pre>
75
75
76
76
<h4>Results and Metrics grid:</h4>
77
77
<table id="tableXml">
@@ -109,29 +109,29 @@ if ($this->log != false) {
109
109
foreach ($ this ->results ['params ' ]['parametersList ' ] as $ key => $ parameter ) {
110
110
if (isset ($ result ['parameters ' ][$ key ]) && isset ($ this ->inputs [trim ($ result ['parameters ' ][$ key ])])
111
111
) {
112
- echo "<td><a href=' " .$ this ->webroot ."/item/ " .$ this ->inputs [trim (
112
+ echo "<td><a href=' " .$ this ->webroot ."/item/ " .$ this ->escape ( $ this -> inputs [trim (
113
113
$ result ['parameters ' ][$ key ]
114
- )]->getKey ()."' elementItem=' " .$ this ->inputs [trim ($ result ['parameters ' ][$ key ])]->getKey (
115
- )."'> " .$ this ->slicename (
116
- $ result ['parameters ' ][$ key ],
114
+ )]->getKey ()) ."' elementItem=' " .$ this -> escape ( $ this ->inputs [trim ($ result ['parameters ' ][$ key ])]->getKey (
115
+ )) ."'> " .$ this ->slicename (
116
+ $ this -> escape ( $ result ['parameters ' ][$ key ]) ,
117
117
15
118
118
)."</a></td> " ;
119
119
} else {
120
120
if (isset ($ result ['parameters ' ][$ key ])) {
121
- echo "<td> " .$ this ->slicename ($ result ['parameters ' ][$ key ], 15 )."</td> " ;
121
+ echo "<td> " .$ this ->slicename ($ this -> escape ( $ result ['parameters ' ][$ key ]) , 15 )."</td> " ;
122
122
} else {
123
123
echo "<td></td> " ;
124
124
}
125
125
}
126
126
}
127
- echo "<td class='xmlStatus'> " .$ result ['status ' ]."</td> " ;
127
+ echo "<td class='xmlStatus'> " .$ this -> escape ( $ result ['status ' ]) ."</td> " ;
128
128
echo "<td> " .str_replace (' seconds ' , 's ' , $ this ->duration ($ result ['time ' ]))."</td> " ;
129
- echo "<td class='showInDialog' output=' " .htmlentities ($ result ['stdout ' ])."'><a> " .$ this ->slicename (
130
- htmlentities ($ result ['stdout ' ]),
129
+ echo "<td class='showInDialog' output=' " .$ this -> escape ($ result ['stdout ' ])."'><a> " .$ this ->slicename (
130
+ $ this -> escape ($ result ['stdout ' ]),
131
131
15
132
132
)."</a></td> " ;
133
- echo "<td class='showInDialog' output=' " .htmlentities ($ result ['stderr ' ])."'><a> " .$ this ->slicename (
134
- htmlentities ($ result ['stderr ' ]),
133
+ echo "<td class='showInDialog' output=' " .$ this -> escape ($ result ['stderr ' ])."'><a> " .$ this ->slicename (
134
+ $ this -> escape ($ result ['stderr ' ]),
135
135
15
136
136
)."</a></td> " ;
137
137
@@ -169,7 +169,7 @@ if ($this->job->getStatus() == MIDAS_REMOTEPROCESSING_STATUS_DONE && !empty($thi
169
169
echo "<th><b>Thumbnail</b></th> " ;
170
170
171
171
foreach ($ this ->parameters as $ parameter ) {
172
- echo "<th><b> " .ucfirst ($ parameter )."</b></th> " ;
172
+ echo "<th><b> " .ucfirst ($ this -> escape ( $ parameter) )."</b></th> " ;
173
173
}
174
174
?>
175
175
</tr>
@@ -179,26 +179,26 @@ if ($this->job->getStatus() == MIDAS_REMOTEPROCESSING_STATUS_DONE && !empty($thi
179
179
foreach ($ this ->outputs as $ output ) {
180
180
echo "<tr> " ;
181
181
$ metadata = $ output ->metadataParameters ;
182
- echo "<td><a href=' " .$ this ->webroot ."/item/ " .$ output ->getKey ()."' elementItem=' " .$ output ->getKey (
183
- )."'> " .$ output ->getName ()."</a></td> " ;
182
+ echo "<td><a href=' " .$ this ->webroot ."/item/ " .$ this -> escape ( $ output ->getKey ()) ."' elementItem=' " .$ this -> escape ( $ output ->getKey (
183
+ )) ."'> " .$ this -> escape ( $ output ->getName () )."</a></td> " ;
184
184
$ path = $ output ->getThumbnail ();
185
185
echo "<td> " ;
186
186
if (!empty ($ path ) && file_exists (BASE_PATH .'/ ' .$ path )) {
187
187
echo "
188
- <img class='infoLogo' alt='' src=' {$ this ->webroot }/ {$ path }'/>
188
+ <img class='infoLogo' alt='' src=' {$ this ->webroot }/ {$ this -> escape ( $ path) }'/>
189
189
" ;
190
190
}
191
191
echo "</td> " ;
192
192
foreach ($ this ->parameters as $ parameter ) {
193
193
if (isset ($ metadata [$ parameter ]) && isset ($ this ->inputs [trim ($ metadata [$ parameter ])])
194
194
) {
195
- echo "<td><a href=' " .$ this ->webroot ."/item/ " .$ this ->inputs [trim (
195
+ echo "<td><a href=' " .$ this ->webroot ."/item/ " .$ this ->escape ( $ this -> inputs [trim (
196
196
$ metadata [$ parameter ]
197
- )]->getKey ()."' elementItem=' " .$ this ->inputs [trim ($ metadata [$ parameter ])]->getKey (
198
- )."'> " .$ metadata [$ parameter ]."</a></td> " ;
197
+ )]->getKey ()) ."' elementItem=' " .$ this -> escape ( $ this ->inputs [trim ($ metadata [$ parameter ])]->getKey (
198
+ )) ."'> " .$ this -> escape ( $ metadata [$ parameter ]) ."</a></td> " ;
199
199
} else {
200
200
if (isset ($ metadata [$ parameter ])) {
201
- echo "<td> " .$ metadata [$ parameter ]."</td> " ;
201
+ echo "<td> " .$ this -> escape ( $ metadata [$ parameter ]) ."</td> " ;
202
202
} else {
203
203
echo "<td></td> " ;
204
204
}
@@ -216,13 +216,12 @@ if ($this->job->getStatus() == MIDAS_REMOTEPROCESSING_STATUS_DONE && !empty($thi
216
216
$ itemsList .= $ ouput ->getKey ().'- ' ;
217
217
}
218
218
echo '<div class="genericBigButton "> ' ;
219
- echo "<a href=' {$ this ->webroot }/download?items= {$ itemsList }'><img style='float:left;margin-right:2px;' alt='' src=' {$ this ->coreWebroot }/public/images/icons/download.png'/> " ;
219
+ echo "<a href=' {$ this ->webroot }/download?items= {$ this -> escape ( $ itemsList) }'><img style='float:left;margin-right:2px;' alt='' src=' {$ this ->coreWebroot }/public/images/icons/download.png'/> " ;
220
220
echo $ this ->t ('Download Results ' );
221
221
echo "</a> " ;
222
222
echo '</div> ' ;
223
223
?>
224
224
<?php
225
225
}
226
226
?>
227
-
228
227
</div>
0 commit comments