@@ -26,11 +26,11 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/index/index.ind
26
26
<h2>Deprecated JSON RPC API</h2>
27
27
<div>
28
28
<img style="position: relative; top: 3px;" src="<?php echo $ this ->coreWebroot ?> /public/images/icons/warning.png"> This API is
29
- <b>deprecated</b>. Instead use the <a href="<?php echo $ this ->serverURL .$ this ->webroot ?> /rest">RESTful API</a>.
29
+ <b>deprecated</b>. Instead use the <a href="<?php echo $ this ->escape ( $ this -> serverURL .$ this ->webroot ); ?> /rest">RESTful API</a>.
30
30
</div>
31
31
<br />
32
32
<p>This API will send you a JSON RPC response at the following URL:</p>
33
- <p><b><?php echo $ this ->serverURL .$ this ->webroot ?> /api/json?method=METHOD_NAME</b></p>
33
+ <p><b><?php echo $ this ->escape ( $ this -> serverURL .$ this ->webroot ); ?> /api/json?method=METHOD_NAME</b></p>
34
34
<p>To authenticate requests you can provide a parameter named <b>token</b> with an
35
35
authentication token value obtained by calling <b>midas.login</b>.</p>
36
36
<br />
@@ -39,26 +39,26 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/index/index.ind
39
39
<ul class="listmethods">
40
40
<?php
41
41
foreach ($ this ->data ['api.listmethods ' ] as $ methodname ) {
42
- echo "<li class='methodListElement'> " .$ methodname ." <a class='showHideHelp'>?</a></li> " ;
42
+ echo "<li class='methodListElement'> " .$ this -> escape ( $ methodname) ." <a class='showHideHelp'>?</a></li> " ;
43
43
if (isset ($ this ->help [$ methodname ])) {
44
44
echo "<div class='helpContent'> " ;
45
- echo $ this ->help [$ methodname ]['description ' ].'<br/> ' ;
45
+ echo $ this ->escape ( $ this -> help [$ methodname ]['description ' ]) .'<br/> ' ;
46
46
if (!empty ($ this ->help [$ methodname ]['params ' ])) {
47
47
echo '<b>Parameters</b> ' ;
48
48
foreach ($ this ->help [$ methodname ]['params ' ] as $ key => $ value ) {
49
49
echo '<ul> ' ;
50
- echo "<li><b> {$ key }</b> - {$ value }</li> " ;
50
+ echo "<li><b> {$ this -> escape ( $ key) }</b> - {$ this -> escape ( $ value) }</li> " ;
51
51
echo '</ul> ' ;
52
52
}
53
53
}
54
54
if (!empty ($ this ->help [$ methodname ]['return ' ])) {
55
- echo '<b>Return</b> - ' .$ this ->help [$ methodname ]['return ' ];
55
+ echo '<b>Return</b> - ' .$ this ->escape ( $ this -> help [$ methodname ]['return ' ]) ;
56
56
}
57
57
if (!empty ($ this ->help [$ methodname ]['example ' ])) {
58
58
echo '<br/><b>Examples</b> ' ;
59
59
foreach ($ this ->help [$ methodname ]['example ' ] as $ key => $ value ) {
60
60
echo '<ul> ' ;
61
- echo "<li><b> {$ value }</b> - {$ key }</li> " ;
61
+ echo "<li><b> {$ this -> escape ( $ value) }</b> - {$ this -> escape ( $ key) }</li> " ;
62
62
echo '</ul> ' ;
63
63
}
64
64
}
0 commit comments