@@ -154,7 +154,7 @@ function tootpress_tools() {
154154 <label for="copy-toots">Mastodon API Request</label>
155155 </th>
156156 <td>
157- <a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu©toots=true">Run</a>
157+ <a class="button" href=" ' .esc_url ( admin_url () ).'tools.php?page=tootpress-tools-menu©toots=true">Run</a>
158158 </td>
159159
160160 <!-- Steady Fetch -->
@@ -163,7 +163,7 @@ function tootpress_tools() {
163163 <label for="cron-newtoots">Steady Fetch</label>
164164 </th>
165165 <td>
166- <a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu&cronnewtoots=true"> ' .$ button_newtoots_label .'</a>
166+ <a class="button" href=" ' .esc_url ( admin_url ()) .'tools.php?page=tootpress-tools-menu&cronnewtoots=true"> ' .esc_html ( $ button_newtoots_label) .'</a>
167167 </td>
168168
169169 <!-- Complete Archiv -->
@@ -172,7 +172,7 @@ function tootpress_tools() {
172172 <label for="cron-alltoots">Complete Timeline</label>
173173 </th>
174174 <td>
175- <a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu&cronalltoots=true"> ' .$ button_alltoots_label .'</a>
175+ <a class="button" href=" ' .esc_url ( admin_url ()) .'tools.php?page=tootpress-tools-menu&cronalltoots=true"> ' .esc_html ( $ button_alltoots_label) .'</a>
176176 </td>
177177
178178 <!-- Receive ID -->
@@ -181,7 +181,7 @@ function tootpress_tools() {
181181 <label for="retrieve-id">Account ID</label>
182182 </th>
183183 <td>
184- <a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu&retrieveid=true">Retrieve</a>
184+ <a class="button" href=" ' .esc_url ( admin_url () ).'tools.php?page=tootpress-tools-menu&retrieveid=true">Retrieve</a>
185185 </td>
186186
187187 <!-- Plugin Healthy Check -->
@@ -190,7 +190,7 @@ function tootpress_tools() {
190190 <label for="plugin-healthy-check">Healthy Check</label>
191191 </th>
192192 <td>
193- <a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu&healthy=true">Show Results</a>
193+ <a class="button" href=" ' .esc_url ( admin_url () ).'tools.php?page=tootpress-tools-menu&healthy=true">Show Results</a>
194194 </td>
195195
196196 <!-- Factory Settings -->
@@ -199,7 +199,7 @@ function tootpress_tools() {
199199 <label for="factory-settings">Factory Settings</label>
200200 </th>
201201 <td>
202- <a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu&factorysettings=true">Reset</a>
202+ <a class="button" href=" ' .esc_url ( admin_url () ).'tools.php?page=tootpress-tools-menu&factorysettings=true">Reset</a>
203203 </td>
204204
205205 </table> ' ;
@@ -214,7 +214,7 @@ function tootpress_tools() {
214214
215215 function tootpress_tools_close () {
216216
217- echo '<p> <br/><a class="button" href=" ' .admin_url ().'tools.php?page=tootpress-tools-menu">Back to TootPress Tools</a></p> ' ;
217+ echo '<p> <br/><a class="button" href=" ' .esc_url ( admin_url () ).'tools.php?page=tootpress-tools-menu">Back to TootPress Tools</a></p> ' ;
218218
219219}
220220
@@ -246,7 +246,7 @@ function tootpress_copy_toots_load() {
246246 } else {
247247 // TootPress is not ready to run
248248 echo '<p>Request not possible.</p> ' ;
249- echo tootpress_error_message_required_api_options_missing ();
249+ echo wp_kses ( tootpress_error_message_required_api_options_missing (), tootpress_escaping_allowed_html () );
250250 }
251251
252252 tootpress_tools_close ();
@@ -274,12 +274,12 @@ function tootpress_switch_cron_newtoots_load() {
274274 update_option ('tootpress_cron_newtoots_status ' ,'1 ' );
275275 $ period =tootpress_get_custom_cron_period_in_minutes ();
276276 echo '<p>Cron was activated.<br/> ' ;
277- echo 'Steady Fetch runs every ' .$ period .' Minutes.<br/> ' ;
277+ echo 'Steady Fetch runs every ' .esc_html ( $ period) .' Minutes.<br/> ' ;
278278 echo 'New Toots will be added automatically.</p> ' ;
279279 } else {
280280 // TootPress is not ready to run
281281 echo '<p>Steady Fetch could not be activated.</p> ' ;
282- echo tootpress_error_message_required_api_options_missing ();
282+ echo wp_kses ( tootpress_error_message_required_api_options_missing (), tootpress_escaping_allowed_html () );
283283 }
284284
285285 } else {
@@ -327,7 +327,7 @@ function tootpress_trigger_cron_alltoots_load() {
327327 } else {
328328 // TootPress is not ready to run
329329 echo '<p>Procedure could not be activated.</p> ' ;
330- echo tootpress_error_message_required_api_options_missing ();
330+ echo wp_kses ( tootpress_error_message_required_api_options_missing (), tootpress_escaping_allowed_html () );
331331 }
332332
333333 }
@@ -356,10 +356,10 @@ function tootpress_retrieve_mastodonid() {
356356 $ mastodonid =$ verifycrendentials ['id ' ];
357357
358358 echo '<p>Your Mastodon Account ID is the following.</p> ' ;
359- echo '<p> ' .$ mastodonid .'</p> ' ;
359+ echo '<p> ' .esc_html ( $ mastodonid) .'</p> ' ;
360360
361361 } else {
362- echo tootpress_error_message_instance_andor_token_missing ();
362+ echo wp_kses ( tootpress_error_message_instance_andor_token_missing (), tootpress_escaping_allowed_html () );
363363 }
364364
365365 tootpress_tools_close ();
@@ -377,7 +377,7 @@ function tootpress_healthy_check_load() {
377377 echo '<h1 class="tootpress_tools_headline">TootPress › Healthy Check</h1> ' ;
378378 echo '<p class="tootpress_tools_description">Analysis<br/> </p> ' ;
379379 $ health_status =tootpress_healthy_check ();
380- echo $ health_status ;
380+ echo wp_kses ( $ health_status, tootpress_escaping_allowed_html () ) ;
381381 tootpress_tools_close ();
382382
383383}
0 commit comments