Add html to a node's title I have a Drupal 7 site and I'd like to be able to add an HTML link to part of the title of a node. By default Drupal has this as plain text. Is there any way that I can allow HMTL?

Example:

This is a &lt;a href="#"&gt;title&lt;/a&gt;
That happens because template_process_page() contains the following code.

if (!isset($variables['title'])) {
  $variables['title'] = drupal_get_title();
}


drupal_get_title() calls check_plain().

// During a bootstrap, menu.inc is not included and thus we cannot provide a title.
if (!isset($title) &amp;&amp; function_exists('menu_get_active_title')) {
  $title = check_plain(menu_get_active_title());
}


The only way you have to add HTML to the title is using hook_preprocess_page() and set $variables['title']. 

Keep in mind that $variables['title'] is also used as value for the &lt;title&gt; tag, and browsers should not expect HTML tags inside that tag.


  Titles may contain character entities (for accented characters, special characters, etc.), but may not contain other markup (including comments).


To change just the node title, you should implement hook_preprocess_node() and set $variables['title']. By default, template_preprocess_node() sets it using $variables['title'] = check_plain($node-&gt;title);.
As side note, for the node title, Drupal 8 uses $variables['label'], not $variables['title'].