Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Update cmb_Meta_Box_types.php #762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion helpers/cmb_Meta_Box_types.php
Expand Up @@ -146,14 +146,17 @@ public function concat_attrs( $attrs, $attr_exclude = array() ) {

/**
* Generates html for an option element
*
* LINEUPBOEKENMEDIA: Added escaping of output
*
* @since 1.1.0
* @param string $opt_label Option label
* @param string $opt_value Option value
* @param mixed $selected Selected attribute if option is selected
* @return string Generated option element html
*/
public function option( $opt_label, $opt_value, $selected ) {
return sprintf( "\t".'<option value="%s" %s>%s</option>', $opt_value, selected( $selected, true, false ), $opt_label )."\n";
return sprintf( "\t".'<option value="%s" %s>%s</option>', esc_attr($opt_value), selected( $selected, true, false ), esc_html($opt_label) )."\n";
}

/**
Expand Down