Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit b6e14c5

Browse files
author
Jamie Snape
committed
Escape variables in oai module
1 parent 20b98d3 commit b6e14c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/oai/views/index/index.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,33 @@
2222
<div class="viewMain">
2323
<h2>Midas Platform Web API</h2>
2424
The API will send you a JSON response at the following URL:<br/>
25-
<pre><?php echo $this->serverURL.$this->webroot ?>/api/json?method=METHOD_NAME</pre>
25+
<pre><?php echo $this->escape($this->serverURL.$this->webroot); ?>/api/json?method=METHOD_NAME</pre>
2626

2727
<div class="api.listmethods" id="api.listmethods">
2828
Available methods:
2929
<ul class="listmethods">
3030
<?php
3131
foreach ($this->data['api.listmethods'] as $methodname) {
32-
echo "<li class='methodListElement'>".$methodname." <a class='showHideHelp'>?</a></li>";
32+
echo "<li class='methodListElement'>".$this->escape($methodname)." <a class='showHideHelp'>?</a></li>";
3333
if (isset($this->help[$methodname])) {
3434
echo "<div class='helpContent'>";
35-
echo $this->help[$methodname]['description'].'<br/>';
35+
echo $this->escape($this->help[$methodname]['description']).'<br/>';
3636
if (!empty($this->help[$methodname]['params'])) {
3737
echo '<b>Parameters</b>';
3838
foreach ($this->help[$methodname]['params'] as $key => $value) {
3939
echo '<ul>';
40-
echo "<li><b>{$key}</b> - {$value}</li>";
40+
echo "<li><b>{$this->escape($key)}</b> - {$this->escape($value)}</li>";
4141
echo '</ul>';
4242
}
4343
}
4444
if (!empty($this->help[$methodname]['return'])) {
45-
echo '<b>Return</b> - '.$this->help[$methodname]['return'];
45+
echo '<b>Return</b> - '.$this->escape($this->help[$methodname]['return']);
4646
}
4747
if (!empty($this->help[$methodname]['example'])) {
4848
echo '<br/><b>Examples</b>';
4949
foreach ($this->help[$methodname]['example'] as $key => $value) {
5050
echo '<ul>';
51-
echo "<li><b>{$value}</b> - {$key}</li>";
51+
echo "<li><b>{$this->escape($value)}</b> - {$this->escape($key)}</li>";
5252
echo '</ul>';
5353
}
5454
}

0 commit comments

Comments
 (0)