Replace settings outputs with suitable escape functions

This commit is contained in:
Brian Miyaji
2021-11-06 20:04:07 +09:00
parent fa8e3fdd73
commit bb597b2658
10 changed files with 18 additions and 18 deletions

View File

@@ -356,7 +356,7 @@ class SP_Settings_General extends SP_Settings_Page {
<fieldset>
<?php foreach ( $color_schemes as $name => $colors ) { ?>
<div class="color-option sp-color-option">
<label data-sp-colors="<?php echo implode( ',', $colors ); ?>"><?php echo esc_attr( $name ); ?></label>
<label data-sp-colors="<?php echo implode( ',', $colors ); ?>"><?php echo esc_html( $name ); ?></label>
<table class="color-palette">
<tbody>
<tr>

View File

@@ -62,7 +62,7 @@ class SP_Settings_Licenses extends SP_Settings_Page {
$status = get_site_option( 'sportspress_' . $id . '_license_status', false );
?>
<div class="sp-settings-section sp-settings-section-license_options">
<h3><?php echo esc_attr( $license['name'] ); ?></h3>
<h3><?php echo esc_html( $license['name'] ); ?></h3>
<table class="form-table sp-licenses-table">
<tbody>
<tr>

View File

@@ -193,7 +193,7 @@ class SP_Settings_Modules extends SP_Settings_Page {
<tbody>
<tr><td>
<?php foreach ( $categories as $slug => $category ) { ?>
<p><strong><i class="<?php echo esc_attr( $category['icon'] ); ?>"></i> <?php echo esc_attr( $category['label'] ); ?></strong></p>
<p><strong><i class="<?php echo esc_attr( $category['icon'] ); ?>"></i> <?php echo esc_html( $category['label'] ); ?></strong></p>
<ul class="sp-<?php echo esc_attr( $slug ); ?>-links">
<?php foreach ( $category['links'] as $url => $text ) { ?>
<li><a href="<?php echo esc_url( $url ); ?>" target="_blank"><?php echo wp_kses_post( $text ); ?></a></li>

View File

@@ -390,7 +390,7 @@ class SP_Settings_Status extends SP_Settings_Page {
<td>
<?php
$object = get_post_type_object( $post_type );
echo esc_attr( $object->labels->name );
echo esc_html( $object->labels->name );
?>:
</td>
<td>
@@ -442,13 +442,13 @@ class SP_Settings_Status extends SP_Settings_Page {
<tr>
<td><?php _e( 'Theme Name', 'sportspress' ); ?>:</td>
<td><?php
echo esc_attr( $active_theme->Name );
echo esc_html( $active_theme->Name );
?></td>
</tr>
<tr>
<td><?php _e( 'Theme Version', 'sportspress' ); ?>:</td>
<td><?php
echo esc_attr( $active_theme->Version );
echo esc_html( $active_theme->Version );
if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) )
echo ' &ndash; <strong style="color:red;">' . $theme_version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '</strong>';