Main menu

HTML\rich text in Drupal's node title

25 Feb
Published by Mark W. Breneman

HTML\rich text in Drupal's node title? - Stack OverflowHTML\rich text in Drupal's node title?function mytheme_preprocess_node(&$vars) { // It's 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);}

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.