Merge pull request #19529 from woocommerce/fix/incorrect-escaping

Fixes incorrect escaping
This commit is contained in:
Claudio Sanches 2018-03-28 14:33:43 -03:00 committed by GitHub
commit 6b903cf4bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 12 deletions

View File

@ -11,35 +11,35 @@
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates
* @version 3.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
defined( 'ABSPATH' ) || exit;
global $comment;
$verified = wc_review_is_from_verified_owner( $comment->comment_ID );
if ( '0' === $comment->comment_approved ) { ?>
<p class="meta"><em class="woocommerce-review__awaiting-approval"><?php esc_attr_e( 'Your review is awaiting approval', 'woocommerce' ); ?></em></p>
<p class="meta">
<em class="woocommerce-review__awaiting-approval">
<?php esc_html_e( 'Your review is awaiting approval', 'woocommerce' ); ?>
</em>
</p>
<?php } else { ?>
<p class="meta">
<strong class="woocommerce-review__author"><?php comment_author(); ?></strong> <?php
<strong class="woocommerce-review__author"><?php comment_author(); ?> </strong>
<?php
if ( 'yes' === get_option( 'woocommerce_review_rating_verification_label' ) && $verified ) {
echo '<em class="woocommerce-review__verified verified">(' . esc_attr__( 'verified owner', 'woocommerce' ) . ')</em> ';
}
?><span class="woocommerce-review__dash">&ndash;</span>
<time class="woocommerce-review__published-date" datetime="<?php echo esc_attr( get_comment_date( 'c' ) ); ?>">
<?php echo esc_html( get_comment_date( wc_date_format() ) ); ?>
</time>
?>
<span class="woocommerce-review__dash">&ndash;</span> <time class="woocommerce-review__published-date" datetime="<?php echo esc_attr( get_comment_date( 'c' ) ); ?>"><?php echo esc_html( get_comment_date( wc_date_format() ) ); ?></time>
</p>
<?php }
<?php
}