PluginProbe
Property Hive / 2.4.0
Property Hive v2.4.0
2.4.0 2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 All 262 releases
← All changes | templates/single-property/actions.php +9 -5 1.4.57 → 2.4.0 View file →
@@ -32,25 +32,29 @@
32 32 foreach ($actions as $action)
33 33 {
34 34 $action['class'] = ( isset( $action['class'] ) ) ? $action['class'] : '';
35 35
36 - echo '<li class="' . $action['class'] . '"';
36 + echo '
37 + <li class="' . esc_attr($action['class']) . '"';
37 38 if ( isset( $action['parent_attributes'] ) && ! empty( $action['parent_attributes'] ) )
38 39 {
40 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
39 41 foreach ( $action['parent_attributes'] as $key => $value )
40 42 {
41 - echo ' ' . $key . '="' . $value . '"';
43 + echo ' ' . esc_attr( $key ) . '="' . esc_attr($value) . '"';
42 44 }
43 45 }
44 - echo '><a href="' . $action['href'] . '"';
46 + echo '><a href="' . esc_url($action['href']) . '"';
45 47 if ( isset( $action['attributes'] ) && ! empty( $action['attributes'] ) )
46 48 {
49 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone.
47 50 foreach ( $action['attributes'] as $key => $value )
48 51 {
49 - echo ' ' . $key . '="' . $value . '"';
52 + echo ' ' . esc_attr( $key ) . '="' . esc_attr($value) . '"';
50 53 }
51 54 }
52 - echo '>' . $action['label'] . '</a></li>';
55 + echo '>' . esc_html($action['label']) . '</a></li>
56 + ';
53 57 }
54 58 ?>
55 59
56 60 <?php do_action( 'propertyhive_property_actions_list_end' ); ?>