HTML tags are not allowed in titles, and they are escaped. The HTML 4.01 Specification reports the following text:
Titles may contain character entities (for accented characters, special characters, etc.), but may not contain other markup (including comments). Here is a sample document title:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>A study of population dynamics</TITLE>
... other head elements...
</HEAD>
<BODY>
... document body...
</BODY>
</HTML>
For using HTML tags in the page title, you should set it with drupal_set_title($title, PASS_THROUGH), but I would not suggest doing it, as the title is used for both the page, and the browser title, which should not contains HTML tags for what I reported before.
As PASS_THROUGH
by-pass the call to check_plain()
, you should check the value you pass as $title
, and verify it doesn't contain dangerous characters. I would also suggest to use the Page Title module to avoid the browser title contains any HTML tags; as the module set for the browser title a value different from the page title, you could have HTML tags only in the page title.
Apart from separating the text with " | " the only solution is to have the title in a single language; after all Drupal support multi-language content, and the translation of a node to different enabled languages.