wp_title destroying numeric character references
-
I’m having problems with wp_title destroying numeric character references in my post titles. I use the following ‘title’ element:
<title><?php bloginfo('name'); ?>: <?php wp_title('', true, 'left'); ?></title>
If the title of my post is written ‘foo bar’, this is converted to ‘Blogname: foo bar’, i.e., the & character is wrongly encoded to &, so that the title of the page (shown in the title bar and in bookmarks) is ‘foo bar’.
Note that using ‘the_title’ on the main page and post page works fine (& is not converted to &), but this is not appropriate for the XHTML ‘title‘ element, as this can’t contain HTML tags.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_title destroying numeric character references’ is closed to new replies.