Skip to content

Commit

Permalink
Escaping attribute at walker class.
Browse files Browse the repository at this point in the history
As the data are coming from WordPress background, escaping attributes aren't that necessary. But I think best practice what ever or where ever the data is coming form that should be escaped and validated before storing and presenting. So escaping the attributes are better here.
  • Loading branch information
khanrn authored Nov 8, 2017
1 parent 7b124fb commit 442b096
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions walker.taxonomy-single-term.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public function start_el( &$output, $term, $depth = 0, $args = array(), $id = 0
$in_selected = in_array( $term->term_id, $selected_cats );

$args = array(
'id' => $taxonomy .'-'. $term->term_id,
'name' => $name,
'value' => $value,
'id' => esc_attr( $taxonomy .'-'. $term->term_id ),
'name' => esc_attr( $name ),
'value' => esc_attr( $value ),
'checked' => checked( $in_selected, true, false ),
'selected' => selected( $in_selected, true, false ),
'disabled' => disabled( empty( $args['disabled'] ), false, false ),
Expand Down

0 comments on commit 442b096

Please sign in to comment.