How to make description field to allow html tags?

Yuki - August 26, 2009 - 14:00
Project:FileField
Version:6.x-3.1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

How to make description field (which is usually disabled but we can enable it) to allow html tags so that we can write html tags in description field and can link to other files etc.

#1

Yuki - September 3, 2009 - 10:28

Could somebody help me please.

#2

asak - December 17, 2009 - 15:23

I'm looking for a solution for this as well... will update when i find one ;)

#3

asak - December 17, 2009 - 16:04

Ok - played with this some, and found that the following works:

Change the code in filefield_handler_field_data.inc (line 38):

<?php
 
function render($values) {
   
$values = drupal_clone($values); // Prevent affecting the original.
   
$data = unserialize($values->{$this->field_alias});
   
//$data = $values->{$this->field_alias};
   
$values->{$this->field_alias} = $data[$this->options['data_key']];
   
$passme = $values->{$this->field_alias};
   
//return parent::render($values);
   
return check_markup($passme, $this->options['format'], FALSE);
  }
?>

#4

Yuki - December 21, 2009 - 02:03

Nothing has changed after changing the code even clearing the cached data...the requirement is the file should be there but there will be a separate description field of that file and If I write any url over in that description it should link to that url.

 
 

Drupal is a registered trademark of Dries Buytaert.