Merge pull request #346 from ramiy/master - thx @ramiy

Fix wrong escaping functions
This commit is contained in:
Holger 2017-06-09 07:52:21 +02:00 committed by GitHub
commit 9781c903ae
18 changed files with 20 additions and 20 deletions

View File

@ -14,7 +14,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="404-wrapper"> <div class="wrapper" id="404-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -17,7 +17,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="archive-wrapper"> <div class="wrapper" id="archive-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -15,7 +15,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="author-wrapper"> <div class="wrapper" id="author-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">
@ -41,7 +41,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<?php if ( ! empty( $curauth->user_url ) ) : ?> <?php if ( ! empty( $curauth->user_url ) ) : ?>
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt> <dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
<dd> <dd>
<a href="<?php echo esc_html( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a> <a href="<?php echo esc_url( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
</dd> </dd>
<?php endif; ?> <?php endif; ?>

View File

@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="wrapper-footer"> <div class="wrapper" id="wrapper-footer">
<div class="<?php echo esc_html( $container ); ?>"> <div class="<?php echo esc_attr( $container ); ?>">
<div class="row"> <div class="row">

View File

@ -64,9 +64,9 @@ class WP_Bootstrap_Navwalker extends Walker_Nav_Menu {
} else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) { } else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="divider" role="presentation">'; $output .= $indent . '<li class="divider" role="presentation">';
} else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) { } else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_attr( $item->title ); $output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_html( $item->title );
} else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) { } else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) {
$output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_attr( $item->title ) . '</a>'; $output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_html( $item->title ) . '</a>';
} else { } else {
$class_names = $value = ''; $class_names = $value = '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes; $classes = empty( $item->classes ) ? array() : (array) $item->classes;

View File

@ -23,7 +23,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="wrapper-index"> <div class="wrapper" id="wrapper-index">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="full-width-page-wrapper"> <div class="wrapper" id="full-width-page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -19,7 +19,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="search-wrapper"> <div class="wrapper" id="search-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="wrapper-footer-full"> <div class="wrapper" id="wrapper-footer-full">
<div class="<?php echo esc_html( $container ); ?>" id="footer-full-content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="wrapper-static-hero"> <div class="wrapper" id="wrapper-static-hero">
<div class="<?php echo esc_html( $container ); ?>" id="wrapper-static-content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -12,7 +12,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="single-wrapper"> <div class="wrapper" id="single-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -19,7 +19,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="woocommerce-wrapper"> <div class="wrapper" id="woocommerce-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -56,7 +56,7 @@ do_action( 'woocommerce_before_cart' ); ?>
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
__( 'Remove this item', 'understrap' ), esc_attr__( 'Remove this item', 'understrap' ),
esc_attr( $product_id ), esc_attr( $product_id ),
esc_attr( $_product->get_sku() ) esc_attr( $_product->get_sku() )
), $cart_item_key ); ), $cart_item_key );

View File

@ -46,7 +46,7 @@ if ( ! defined( 'ABSPATH' ) ) {
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" class="remove" title="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', '<a href="%s" class="remove" title="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
__( 'Remove this item', 'understrap' ), esc_attr__( 'Remove this item', 'understrap' ),
esc_attr( $product_id ), esc_attr( $product_id ),
esc_attr( $_product->get_sku() ) esc_attr( $_product->get_sku() )
), $cart_item_key ); ), $cart_item_key );