Recent Changes - Search:

PmWiki

pmwiki.org

00978

Summary: Charset bug in page text variables.
Created: 2007-09-20 15:51
Status: Open
Category: Bug
From: swestrup
Assigned:
Priority: 3
Version: 2.2.0-beta63
OS: Apache/Linux/4.x

Description: Page text variables, as indicated in the $PageTextPatterns regexes, are allowed to contain '-' in their names, thusly:

$PageTextVarPatterns = array
( 'var:'        => '/^(:*\\s*(\\w[-\\w]*)\\s*:[ \\t]?)(.*)($)/m'
, '(:var:...:)' => '/(\\(: *(\\w[-\\w]*) *:(?!\\))\\s?)(.*?)(:\\))/s'
);

But the markup that detects variable's doesn't allow that:

# {$var} substitutions
Markup('{$var}', '>$[phrase]',
   '/\\{(\\*|!?[-\\w.\\/\\x80-\\xff]*)(\\$:?\\w+)\\}/e',

I recommend that the latter markup be extended to cover the same character set as the former. At the very least, they should both accept the same set of chars.

Edit - History - Print - Recent Changes - Search
Page last modified on January 12, 2008, at 06:40 AM