Update abstract-wc-legacy-order.php

Added escaping
This commit is contained in:
Nikhil Chaudhary 2019-09-10 10:40:16 +05:30 committed by GitHub
parent fe2ec80b18
commit fe43184455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -505,7 +505,7 @@ abstract class WC_Abstract_Legacy_Order extends WC_Data {
$i++;
/* translators: 1: current item count */
$prefix = count( $download_files ) > 1 ? sprintf( __( 'Download %d', 'woocommerce' ), $i ) : __( 'Download', 'woocommerce' );
$links[] = '<small class="download-url">' . $prefix . ': <a href="' . esc_url( $file['download_url'] ) . '" target="_blank">' . esc_html( $file['name'] ) . '</a></small>' . "\n";
$links[] = '<small class="download-url">' . esc_html( $prefix ) . ': <a href="' . esc_url( $file['download_url'] ) . '" target="_blank">' . esc_html( $file['name'] ) . '</a></small>' . "\n";
}
echo '<br/>' . implode( '<br/>', $links );