@@ -26,11 +26,11 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/index/index.ind
2626 <h2>Deprecated JSON RPC API</h2>
2727 <div>
2828 <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>.
3030 </div>
3131 <br />
3232 <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>
3434 <p>To authenticate requests you can provide a parameter named <b>token</b> with an
3535 authentication token value obtained by calling <b>midas.login</b>.</p>
3636 <br />
@@ -39,26 +39,26 @@ $this->headScript()->appendFile($this->moduleWebroot.'/public/js/index/index.ind
3939 <ul class="listmethods">
4040 <?php
4141 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> " ;
4343 if (isset ($ this ->help [$ methodname ])) {
4444 echo "<div class='helpContent'> " ;
45- echo $ this ->help [$ methodname ]['description ' ].'<br/> ' ;
45+ echo $ this ->escape ( $ this -> help [$ methodname ]['description ' ]) .'<br/> ' ;
4646 if (!empty ($ this ->help [$ methodname ]['params ' ])) {
4747 echo '<b>Parameters</b> ' ;
4848 foreach ($ this ->help [$ methodname ]['params ' ] as $ key => $ value ) {
4949 echo '<ul> ' ;
50- echo "<li><b> {$ key }</b> - {$ value }</li> " ;
50+ echo "<li><b> {$ this -> escape ( $ key) }</b> - {$ this -> escape ( $ value) }</li> " ;
5151 echo '</ul> ' ;
5252 }
5353 }
5454 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 ' ]) ;
5656 }
5757 if (!empty ($ this ->help [$ methodname ]['example ' ])) {
5858 echo '<br/><b>Examples</b> ' ;
5959 foreach ($ this ->help [$ methodname ]['example ' ] as $ key => $ value ) {
6060 echo '<ul> ' ;
61- echo "<li><b> {$ value }</b> - {$ key }</li> " ;
61+ echo "<li><b> {$ this -> escape ( $ value) }</b> - {$ this -> escape ( $ key) }</li> " ;
6262 echo '</ul> ' ;
6363 }
6464 }
0 commit comments