Revision f1239704
Added by Katja Luther over 5 years ago
modules/cdm_dataportal/includes/pre-drupal8.inc | ||
---|---|---|
189 | 189 |
* an array of attributes of the DT element |
190 | 190 |
* |
191 | 191 |
*/ |
192 |
function _description_list_group_add(&$groups, $term, $description, $suffix = '', $weight=NULL, array $dt_attributes=NULL) { |
|
192 |
function _description_list_group_add(&$groups, $term, $description, $suffix = '', $weight=NULL, array $dt_attributes=NULL, $isremoveDrupalHtml=true) { |
|
193 |
|
|
194 |
if (!is_array($description)&& $isremoveDrupalHtml) { |
|
193 | 195 |
|
194 |
if (!is_array($description)) { |
|
195 | 196 |
$description = trim(drupal_html_to_text($description)); |
197 |
// if (!is_array($description) && strpos($description, 'http:') !== false ){ |
|
198 |
// //make links for urls |
|
199 |
// $description = l($description, $description, array('attributes' => array('target' => '_blank'))); |
|
200 |
// } |
|
196 | 201 |
} |
197 | 202 |
|
198 | 203 |
if ($description) { |
... | ... | |
210 | 215 |
} else { |
211 | 216 |
$term_elements = $term; |
212 | 217 |
} |
213 |
if (strpos($description, 'http:') !== false && !is_array($description)){ |
|
214 |
//make links for urls |
|
215 |
$description = l($description, $description); |
|
216 |
} |
|
218 |
|
|
217 | 219 |
$groups[$term] = array( |
218 | 220 |
'term' => $term_elements, |
219 | 221 |
'description' => $description, |
Also available in: Unified diff
ref #7599: fix problem with links in descriptions