Projet

Général

Profil

Révision 7547bb19

Ajouté par Assos Assos il y a environ 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.func.php
22 22
  $element = $variables['element'];
23 23
  $sub_menu = '';
24 24

  
25
  $title = $element['#title'];
26
  $href = $element['#href'];
27 25
  $options = !empty($element['#localized_options']) ? $element['#localized_options'] : array();
26

  
27
  // Filter the title if the "html" is not set, otherwise l() will automatically
28
  // sanitize using check_plain(), so no need to call that here.
29
  $title = empty($options['html']) ? filter_xss_admin($element['#title']) : $element['#title'];
30

  
31
  $href = $element['#href'];
28 32
  $attributes = !empty($element['#attributes']) ? $element['#attributes'] : array();
29 33

  
30 34
  if ($element['#below']) {
......
52 56
    }
53 57
  }
54 58

  
55
  // Filter the title if the "html" is set, otherwise l() will automatically
56
  // sanitize using check_plain(), so no need to call that here.
57
  if (!empty($options['html'])) {
58
    $title = _bootstrap_filter_xss($title);
59
  }
60

  
61 59
  return '<li' . drupal_attributes($attributes) . '>' . l($title, $href, $options) . $sub_menu . "</li>\n";
62 60
}
63 61

  
......
90 88
    $attributes['class'][] = 'active';
91 89
  }
92 90

  
93
  // Filter the title if the "html" is set, otherwise l() will automatically
94
  // sanitize using check_plain(), so no need to call that here.
95
  if (!empty($options['html'])) {
96
    $title = _bootstrap_filter_xss($title);
97
  }
98

  
99 91
  // Convert to a link.
100 92
  if ($link) {
101 93
    $title = l($title, $href, $options);
102 94
  }
95
  // Otherwise, filter the title if "html" is not set, otherwise l() will automatically
96
  // sanitize using check_plain(), so no need to call that here.
97
  elseif (empty($options['html'])) {
98
    $title = filter_xss_admin($title);
99
  }
103 100

  
104 101
  return '<li' . drupal_attributes($attributes) . '>' . $title . $sub_menu . "</li>\n";
105 102
}

Formats disponibles : Unified diff