Strip tags in cart messages and breadcrumbs

Fixes #10074
This commit is contained in:
Mike Jolley 2016-01-15 09:59:04 +00:00
parent 25ea52dec1
commit 734bde83f9
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class WC_Breadcrumb {
*/ */
public function add_crumb( $name, $link = '' ) { public function add_crumb( $name, $link = '' ) {
$this->crumbs[] = array( $this->crumbs[] = array(
$name, strip_tags( $name ),
$link $link
); );
} }

View File

@ -97,7 +97,7 @@ function wc_format_list_of_items( $items ) {
$item_string = ''; $item_string = '';
foreach ( $items as $key => $item ) { foreach ( $items as $key => $item ) {
$item_string .= sprintf( _x( '“%s”', 'Item name in quotes', 'woocommerce' ), $item ); $item_string .= sprintf( _x( '“%s”', 'Item name in quotes', 'woocommerce' ), strip_tags( $item ) );
if ( $key + 2 === sizeof( $items ) ) { if ( $key + 2 === sizeof( $items ) ) {
$item_string .= ' ' . __( 'and', 'woocommerce' ) . ' '; $item_string .= ' ' . __( 'and', 'woocommerce' ) . ' ';