Skip to content

Commit 6bf76ea

Browse files
committed
Escaping added
1 parent 2a14c17 commit 6bf76ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tootpress_healthy.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,20 @@ function tootpress_healthy_check() {
9797
// Check: Are TootPress Folders in WordPress Uploads existing and writable?
9898
$apidata_dir_path=tootpress_get_apidata_directory();
9999
if ( ! file_exists( $apidata_dir_path ) ) {
100-
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.$apidata_dir_path.' not found.';
100+
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.esc_html($apidata_dir_path).' not found.';
101101
} elseif (is_writable($apidata_dir_path)) {
102-
$output.='Directory '.$apidata_dir_path.' exists and is writable.';
102+
$output.='Directory '.esc_html($apidata_dir_path).' exists and is writable.';
103103
} else {
104-
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.$apidata_dir_path.' is not writable.';
104+
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.esc_html($apidata_dir_path).' is not writable.';
105105
}
106106
$output.='<br/>';
107107
$image_dir_path=tootpress_get_path_image_directory();
108108
if ( ! file_exists( $image_dir_path ) ) {
109-
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.$image_dir_path.' not found.';
109+
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.esc_html($image_dir_path).' not found.';
110110
} elseif (is_writable($image_dir_path)) {
111-
$output.='Directory '.$image_dir_path.' exists and is writable.';
111+
$output.='Directory '.esc_html($image_dir_path).' exists and is writable.';
112112
} else {
113-
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.$image_dir_path.' is not writable.';
113+
$output.='<span class="tootpress-healtycheck-error">&nbsp;Error:&nbsp;</span> Directory '.esc_html($image_dir_path).' is not writable.';
114114
}
115115
$output.='<br/>';
116116

0 commit comments

Comments
 (0)