Summary: Character markup ignored by directive
Created: 2012-07-03 19:04
Status: Open
Category: Feature
From: pokeeffe?
Priority: 2
Version: 2.2.36
OS: xampp on WinXP-64

Description: The page title directive does not respect character formatting markup. I noticed this while trying to include subscript characters in a page title but it is equally applicable to other markup discussed on the PmWiki.CharacterMarkup page. Note that using the title as a page variable results in the correct display format - it is only the title on the page itself which does not respect the character formatting.

Seems to me all the text in the title directive gets scooped up and put into an H1 header without checking its contents for markup. Sure it might make sense to prohibit text size mark up but I can't see any valid reason to restrict italics, bold, super/subscript or monospace formats in a page title.

Test page: Test.CharMarkupInTitle

The title directive most importantly sets the title tag in the HTML page, the one which usually appears on the browser window top border. The HTML title tag cannot contain any markup so the directive is considered plain text. Now, a page variable is expanded to its plain text content before most other markups are processed, later this text/markup passes through the markup engine and is transformed to HTML.

While we are not likely to change the default core behavior of the title, there is a workaround. Edit your skin template file, usually pmwiki/pub/skins/{SKIN}/{SKIN}.tmpl and change the part:

  <h1 class='pagetitle'>{$Title}</h1>

to this:

  <h1 class='pagetitle'><!--markup:{$Title}--></h1>

This will tell PmWiki to try to process the title content in order to render any markup. --Petko July 04, 2012, at 03:24 AM