Description

Describe the bug...

Steps to reproduce

  1. Enter a new page title ending in "Template" with a digit somewhere in the title, for example "Week2Template".

  2. Choose "Create new empty page".
  3. While editing the newly created page, insert any page substitution variable, say atPAGEat with @ instead of at, of course.
  4. In Preview and following a save, the substitution will occur, even though the page is a template page.

Example

http://wiki.ecom.arizona.edu/privacysecurity/moin.cgi/TechnicalWeek2Template?action=show

Details

MoinMoin Version

Release 1.3.5 [Revision 1.3.5 release]

OS and Version

Red Hat Linux 3.2.3-52

Python Version

2.4.1 (#1, Aug 18 2005, 12:31:39) [GCC 3.2.3 20030502 ]

Server Setup

Server Details

Workaround

Replace numerals with written equivalent, so instead of Week2Template use WeekTwoTemplate, for example.

Discussion

If a template page title has a digit in it, all variables are replaced, even though variable substitution is not supposed to occur in template pages. The page will still appear on the list of templates for new page creation and in the Template category, so it seems to behave as a template in all respects (that I know of), except for variable substitution. I've tried many variations in page titles to see if there are any other instances where this occurs or if it's a problem in other respects, but so far the problem occurs whenever a digit appears anywhere in the title and only when there's a digit.

The regex for Templates reads [a-z]Template$. A digit direct before "Template" simply won't match. Can be fixed for 1.3.x by configuration:

    page_template_regex = u'[a-z0-9]Template$'

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/VariableSubstitutionInTemplatePageWithDigitInTitle (last edited 2007-10-29 19:21:00 by localhost)