|
17 | 17 | <div class="wrap"> |
18 | 18 | <h1>Javascript Error Reporting</h1> |
19 | 19 | <form> |
20 | | - <input type='hidden' name='page' value='<?php echo $this->name; ?>'> |
| 20 | + <input type='hidden' name='page' value='<?php echo esc_attr($this->name); ?>'> |
21 | 21 | <div class="tablenav top"> |
22 | 22 |
|
23 | 23 | <div class="alignleft"> |
24 | 24 | <label for="date-from-select" class="">Between:</label> |
25 | | - <input type='datetime-local' name="time_from" id="date-from-select" value='<?php echo isset($_REQUEST['time_from']) ? $_REQUEST['time_from'] : ''; ?>'></input> |
| 25 | + <input type='datetime-local' name="time_from" id="date-from-select" value='<?php echo esc_attr(isset($_REQUEST['time_from']) ? $_REQUEST['time_from'] : ''); ?>'></input> |
26 | 26 | <label for="date-to-select" class=""> : </label> |
27 | | - <input type='datetime-local' name="time_to" id="date-to-select" value='<?php echo isset($_REQUEST['time_to']) ? $_REQUEST['time_to'] : ''; ?>'></input> |
| 27 | + <input type='datetime-local' name="time_to" id="date-to-select" value='<?php echo esc_attr(isset($_REQUEST['time_to']) ? $_REQUEST['time_to'] : ''); ?>'></input> |
28 | 28 | <input type="submit" id="doaction" class="button action" value="Filter"> |
29 | 29 |
|
30 | 30 |
|
31 | 31 | <?php foreach ($this->getFilters() as $key => $value) : ?> |
32 | 32 | <?php if ($key !== 'time_from' && $key !== 'time_to') : ?> |
33 | | - <input type='hidden' name='<?php echo $key; ?>' value='<?php echo $value; ?>'> |
34 | | - <a class='button' href='<?php echo $this->removeFilterUrl($key); ?>'> |
| 33 | + <input type='hidden' name='<?php echo esc_attr($key); ?>' value='<?php echo esc_attr($value); ?>'> |
| 34 | + <a class='button' href='<?php echo esc_url($this->removeFilterUrl($key)); ?>'> |
35 | 35 | <span class="dashicons dashicons-remove" style='line-height:1.4;'></span> |
36 | 36 | <?php |
37 | 37 | if ($key === 'userId') { |
38 | 38 | if ($value == 0) { |
39 | 39 | echo "Anonymous"; |
40 | 40 | } else { |
41 | | - echo get_userdata($value)->user_nicename; |
| 41 | + echo wp_kses_post(get_userdata($value)->user_nicename); |
42 | 42 | } |
43 | 43 | } else { |
44 | | - echo $value; |
| 44 | + echo wp_kses_post($value); |
45 | 45 | } |
46 | 46 | ?> |
47 | 47 | </a> |
48 | 48 | <?php endif; ?> |
49 | 49 | <?php endforeach; ?> |
50 | | - <a class="button" href="?page=<?php echo $this->name; ?>">Reset</a> |
| 50 | + <a class="button" href="?page=<?php echo esc_attr($this->name); ?>">Reset</a> |
51 | 51 | </div> |
52 | 52 | <?php $this->displayPagination(); ?> |
53 | 53 | <br class="clear"> |
|
74 | 74 | $user = get_userdata($row->userId); |
75 | 75 | } ?> |
76 | 76 | <td> |
77 | | - <?php echo $row->timestamp; ?> |
| 77 | + <?php echo wp_kses_post($row->timestamp); ?> |
78 | 78 | </td> |
79 | 79 | <td> |
80 | | - <a href='<?php echo $this->getFilterUrl('message', $row->message); ?>'> |
81 | | - <?php echo $row->message; ?> |
| 80 | + <a href='<?php echo esc_url($this->getFilterUrl('message', $row->message)); ?>'> |
| 81 | + <?php echo wp_kses_post($row->message); ?> |
82 | 82 | </a> |
83 | 83 | </td> |
84 | 84 | <td> |
85 | | - <a href='<?php echo $this->getFilterUrl('script', $row->script); ?>'> |
86 | | - <?php echo $row->script; ?> |
| 85 | + <a href='<?php echo esc_url($this->getFilterUrl('script', $row->script)); ?>'> |
| 86 | + <?php echo wp_kses_post($row->script); ?> |
87 | 87 | </a> |
88 | 88 | </td> |
89 | 89 | <td> |
90 | | - <a href='<?php echo $this->getFilterUrl('userId', (isset($user) ? $user->ID : 0)); ?>'> |
91 | | - <?php echo (isset($user) ? $user->user_nicename : 'Anonymous'); ?> |
| 90 | + <a href='<?php echo esc_url($this->getFilterUrl('userId', (isset($user) ? $user->ID : 0))); ?>'> |
| 91 | + <?php echo wp_kses_post(isset($user) ? $user->user_nicename : 'Anonymous'); ?> |
92 | 92 | </a> |
93 | 93 | </td> |
94 | 94 | <td> |
95 | | - <a href='<?php echo $this->getFilterUrl('userIp', $row->userIp); ?>'> |
96 | | - <?php echo $row->userIp; ?> |
| 95 | + <a href='<?php echo esc_url($this->getFilterUrl('userIp', $row->userIp)); ?>'> |
| 96 | + <?php echo wp_kses_post($row->userIp); ?> |
97 | 97 | </a> |
98 | 98 | </td> |
99 | 99 | <td> |
100 | | - <a href='<?php echo $this->getFilterUrl('pageUrl', $row->pageUrl); ?>'> |
101 | | - <?php echo $row->pageUrl; ?> |
| 100 | + <a href='<?php echo esc_url($this->getFilterUrl('pageUrl', $row->pageUrl)); ?>'> |
| 101 | + <?php echo wp_kses_post($row->pageUrl); ?> |
102 | 102 | </a> |
103 | 103 | </td> |
104 | 104 | <td> |
105 | | - <a href='<?php echo $this->getFilterUrl('agent', $row->agent); ?>'> |
106 | | - <?php echo $row->agent; ?> |
| 105 | + <a href='<?php echo esc_url($this->getFilterUrl('agent', $row->agent)); ?>'> |
| 106 | + <?php echo wp_kses_post($row->agent); ?> |
107 | 107 | </a> |
108 | 108 | </td> |
109 | 109 | </tr> |
|
113 | 113 | </form> |
114 | 114 | <div class='tablenav bottom'> |
115 | 115 | <div class='alignleft'> |
116 | | - <form method='POST' action='<?php echo admin_url('admin-post.php'); ?>'> |
| 116 | + <form method='POST' action='<?php echo esc_url(admin_url('admin-post.php')); ?>'> |
117 | 117 | <?php wp_nonce_field($this->action); ?> |
118 | 118 | <?php foreach ($this->getFilters() as $key => $value) : ?> |
119 | | - <input type='hidden' name='<?php echo $key; ?>' value='<?php echo $value; ?>'> |
| 119 | + <input type='hidden' name='<?php echo esc_attr($key); ?>' value='<?php echo esc_attr($value); ?>'> |
120 | 120 | <?php endforeach; ?> |
121 | | - <button class='button' type='submit' name='action' value='<?php echo $this->action; ?>'>Export CSV</button> |
| 121 | + <button class='button' type='submit' name='action' value='<?php echo esc_attr($this->action); ?>'>Export CSV</button> |
122 | 122 | </form> |
123 | 123 | </div> |
124 | 124 | <?php $this->displayPagination(); ?> |
|
0 commit comments