← All changes
|
src/Settings/CustomOptions/TPTQuantityMeasurementField.php
+3
-1
6.5.0
→
8.0.2
View file →
| @@ -22,8 +22,10 @@ | ||
| 22 | 22 | }, 10, 3 ); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function render( $value ) { |
| 26 | + // the description is plugin-defined text (settings arrays), read once for output | |
| 27 | + $description = (string) ( $value['desc'] ?? '' ); | |
| 26 | 28 | if ( ! isset( $value['id'] ) ) { |
| 27 | 29 | $value['id'] = ''; |
| 28 | 30 | } |
| 29 | 31 | |
| @@ -83,9 +85,9 @@ | ||
| 83 | 85 | </div> |
| 84 | 86 | </div> |
| 85 | 87 | <p class="description"> |
| 86 | 88 | <?php |
| 87 | - echo wp_kses_post( $value['desc'] ); // audit.php.wp.security.xss.shortcode-attr ignore | |
| 89 | + echo wp_kses_post( $description ); // nosemgrep | |
| 88 | 90 | ?> |
| 89 | 91 | </p> |
| 90 | 92 | </td> |
| 91 | 93 | </tr> |