HTML \ rich text in Drupal node title?

I need node headers to display some text formatting.

As far as I understand, the Drupal header field is just text, it does not allow HTML or any other input format. Is this true? Is there a way to override this or another solution?

I am working with Drupal 6.

+5
source share
3 answers

You can do this quite easily in your topic, there are different ways to do this. The simplest will probably do this in the template.php file

/* this function generates the variables that are available in your node.tpl,
 * you should already have this in your template.php, but if not create it
 */
function mytheme_preprocess_node(&$vars) {
    // It important to run some kind of filter on the title so users can't
    // use fx script tags to inject js or do nasty things.
    $vars['title'] = filter_xss($vars['node']->title);
}

, , $title node.tpl, , . h1 h2, . _xss html-, , . , check_markup filter_xss_admin, filter_xss, , , .

+6

mytheme_preprocess_page D7.

0
-1
source

All Articles