Projet

Général

Profil

Révision 30d5b9c5

Ajouté par Mathieu Schiano Di Schiabica il y a environ 8 ans

Update to 7.42

Voir les différences:

drupal7/modules/field/modules/options/options.module
185 185
  $base = array(
186 186
    'filter_xss' => FALSE,
187 187
    'strip_tags' => FALSE,
188
    'strip_tags_and_unescape' => FALSE,
188 189
    'empty_option' => FALSE,
189 190
    'optgroups' => FALSE,
190 191
  );
......
195 196
    case 'select':
196 197
      $properties = array(
197 198
        // Select boxes do not support any HTML tag.
198
        'strip_tags' => TRUE,
199
        'strip_tags_and_unescape' => TRUE,
199 200
        'optgroups' => TRUE,
200 201
      );
201 202
      if ($multiple) {
......
271 272
      _options_prepare_options($options[$value], $properties);
272 273
    }
273 274
    else {
275
      // The 'strip_tags' option is deprecated. Use 'strip_tags_and_unescape'
276
      // when plain text is required (and where the output will be run through
277
      // check_plain() before being inserted back into HTML) or 'filter_xss'
278
      // when HTML is required.
274 279
      if ($properties['strip_tags']) {
275 280
        $options[$value] = strip_tags($label);
276 281
      }
282
      if ($properties['strip_tags_and_unescape']) {
283
        $options[$value] = decode_entities(strip_tags($label));
284
      }
277 285
      if ($properties['filter_xss']) {
278 286
        $options[$value] = field_filter_xss($label);
279 287
      }

Formats disponibles : Unified diff