Skip to content

Commit dc4d76e

Browse files
committed
Merge branch 'tomjn-patch-1'
2 parents 4b18b35 + b6de02e commit dc4d76e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class-wp-bootstrap-navwalker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function start_lvl( &$output, $depth = 0, $args = array() ) {
7474
// with pointer at end of array check if we got an ID match.
7575
if ( end( $matches[2] ) ) {
7676
// build a string to use as aria-labelledby.
77-
$labelledby = 'aria-labelledby="' . end( $matches[2] ) . '"';
77+
$labelledby = 'aria-labelledby="' . esc_attr( end( $matches[2] ) ) . '"';
7878
}
7979
$output .= "{$n}{$indent}<ul$class_names $labelledby role=\"menu\">{$n}";
8080
}
@@ -245,7 +245,7 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0
245245
}
246246

247247
/** This filter is documented in wp-includes/post-template.php */
248-
$title = apply_filters( 'the_title', $item->title, $item->ID );
248+
$title = apply_filters( 'the_title', esc_html( $item->title ), $item->ID );
249249

250250
/**
251251
* Filters a menu item's title.

0 commit comments

Comments
 (0)