Sanitize the whole class name
Data should be sanitized in whole not in part. Therefore the class prefix should be inside the function call.
This commit is contained in:
parent
c29b9acb5b
commit
2fb700723f
|
@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
?>
|
||||
<dl class="variation">
|
||||
<?php foreach ( $item_data as $data ) : ?>
|
||||
<dt class="variation-<?php echo sanitize_html_class( $data['key'] ); ?>"><?php echo wp_kses_post( $data['key'] ); ?>:</dt>
|
||||
<dd class="variation-<?php echo sanitize_html_class( $data['key'] ); ?>"><?php echo wp_kses_post( wpautop( $data['display'] ) ); ?></dd>
|
||||
<dt class="<?php echo sanitize_html_class( 'variation-' . $data['key'] ); ?>"><?php echo wp_kses_post( $data['key'] ); ?>:</dt>
|
||||
<dd class="<?php echo sanitize_html_class( 'variation-' . $data['key'] ); ?>"><?php echo wp_kses_post( wpautop( $data['display'] ) ); ?></dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
|
|
Loading…
Reference in New Issue