kses/sanitize
This commit is contained in:
parent
2c5f032b0b
commit
962b60c8fe
|
@ -91,7 +91,7 @@ class WC_Report_Stock extends WP_List_Table {
|
|||
|
||||
// Get variation data.
|
||||
if ( $product->is_type( 'variation' ) ) {
|
||||
echo '<div class="description">' . wc_get_formatted_variation( $product, true ) . '</div>';
|
||||
echo '<div class="description">' . wp_kses_post( wc_get_formatted_variation( $product, true ) ) . '</div>';
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -943,7 +943,7 @@ class WC_AJAX {
|
|||
if ( empty( $return ) ) {
|
||||
$return[] = __( 'No products had their stock reduced - they may not have stock management enabled.', 'woocommerce' );
|
||||
}
|
||||
echo implode( ', ', $return );
|
||||
echo wp_kses_post( implode( ', ', $return ) );
|
||||
}
|
||||
wp_die();
|
||||
}
|
||||
|
@ -983,7 +983,7 @@ class WC_AJAX {
|
|||
if ( empty( $return ) ) {
|
||||
$return[] = __( 'No products had their stock increased - they may not have stock management enabled.', 'woocommerce' );
|
||||
}
|
||||
echo implode( ', ', $return );
|
||||
echo wp_kses_post( implode( ', ', $return ) );
|
||||
}
|
||||
wp_die();
|
||||
}
|
||||
|
|
|
@ -246,14 +246,9 @@ class WC_Log_Handler_File extends WC_Log_Handler {
|
|||
|
||||
if ( $file ) {
|
||||
if ( is_file( $file ) && is_writable( $file ) ) {
|
||||
// Close first to be certain no processes keep it alive after it is unlinked.
|
||||
$this->close( $handle );
|
||||
$this->close( $handle ); // Close first to be certain no processes keep it alive after it is unlinked.
|
||||
$removed = unlink( $file );
|
||||
} elseif ( is_file( trailingslashit( WC_LOG_DIR ) . $handle . '.log' ) && is_writable( trailingslashit( WC_LOG_DIR ) . $handle . '.log' ) ) {
|
||||
$this->close( $handle );
|
||||
$removed = unlink( trailingslashit( WC_LOG_DIR ) . $handle . '.log' );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_log_remove', $handle, $removed );
|
||||
}
|
||||
|
||||
|
@ -344,7 +339,7 @@ class WC_Log_Handler_File extends WC_Log_Handler {
|
|||
*/
|
||||
public static function get_log_file_path( $handle ) {
|
||||
if ( function_exists( 'wp_hash' ) ) {
|
||||
return trailingslashit( WC_LOG_DIR ) . $handle . '-' . sanitize_file_name( wp_hash( $handle ) ) . '.log';
|
||||
return trailingslashit( WC_LOG_DIR ) . sanitize_file_name( $handle . '-' . wp_hash( $handle ) . '.log' );
|
||||
} else {
|
||||
wc_doing_it_wrong( __METHOD__, __( 'This method should not be called before plugins_loaded.', 'woocommerce' ), '2.7' );
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue