updated drupal core to 7.43
This commit is contained in:
@@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = options.test
|
||||
|
||||
; Information added by Drupal.org packaging script on 2015-08-19
|
||||
version = "7.39"
|
||||
; Information added by Drupal.org packaging script on 2016-02-24
|
||||
version = "7.43"
|
||||
project = "drupal"
|
||||
datestamp = "1440020197"
|
||||
datestamp = "1456343506"
|
||||
|
||||
|
@@ -185,6 +185,7 @@ function _options_properties($type, $multiple, $required, $has_value) {
|
||||
$base = array(
|
||||
'filter_xss' => FALSE,
|
||||
'strip_tags' => FALSE,
|
||||
'strip_tags_and_unescape' => FALSE,
|
||||
'empty_option' => FALSE,
|
||||
'optgroups' => FALSE,
|
||||
);
|
||||
@@ -195,7 +196,7 @@ function _options_properties($type, $multiple, $required, $has_value) {
|
||||
case 'select':
|
||||
$properties = array(
|
||||
// Select boxes do not support any HTML tag.
|
||||
'strip_tags' => TRUE,
|
||||
'strip_tags_and_unescape' => TRUE,
|
||||
'optgroups' => TRUE,
|
||||
);
|
||||
if ($multiple) {
|
||||
@@ -271,9 +272,16 @@ function _options_prepare_options(&$options, $properties) {
|
||||
_options_prepare_options($options[$value], $properties);
|
||||
}
|
||||
else {
|
||||
// The 'strip_tags' option is deprecated. Use 'strip_tags_and_unescape'
|
||||
// when plain text is required (and where the output will be run through
|
||||
// check_plain() before being inserted back into HTML) or 'filter_xss'
|
||||
// when HTML is required.
|
||||
if ($properties['strip_tags']) {
|
||||
$options[$value] = strip_tags($label);
|
||||
}
|
||||
if ($properties['strip_tags_and_unescape']) {
|
||||
$options[$value] = decode_entities(strip_tags($label));
|
||||
}
|
||||
if ($properties['filter_xss']) {
|
||||
$options[$value] = field_filter_xss($label);
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
|
||||
'cardinality' => 1,
|
||||
'settings' => array(
|
||||
// Make sure that 0 works as an option.
|
||||
'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>'),
|
||||
'allowed_values' => array(0 => 'Zero', 1 => 'One', 2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>', 3 => 'Some HTML encoded markup with < & >'),
|
||||
),
|
||||
);
|
||||
$this->card_1 = field_create_field($this->card_1);
|
||||
@@ -233,6 +233,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
|
||||
$this->assertNoOptionSelected("edit-card-1-$langcode", 1);
|
||||
$this->assertNoOptionSelected("edit-card-1-$langcode", 2);
|
||||
$this->assertRaw('Some dangerous & unescaped markup', 'Option text was properly filtered.');
|
||||
$this->assertRaw('Some HTML encoded markup with < & >', 'HTML entities in option text were properly handled and not double-encoded');
|
||||
|
||||
// Submit form: select invalid 'none' option.
|
||||
$edit = array("card_1[$langcode]" => '_none');
|
||||
|
Reference in New Issue
Block a user