Changeset 276

Show
Ignore:
Timestamp:
02/16/07 14:19:39 (2 years ago)
Author:
nsteiner
Message:

corrected regular expressions (Frank)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/xml/stubXMLPagePostInterceptor.php

    r265 r276  
    9393        $xslProcessor->importXSLStylesheet(DOMDocument::load(stubFactory::getResourceURI('xsl/master.xsl'))); 
    9494        if ($this->request->hasValue('page') == true) { 
    95             $pageName = $this->request->getValidatedValue(new stubRegexValidator('[a-zA-Z0-9_'), 'page'); 
     95            $pageName = $this->request->getValidatedValue(new stubRegexValidator('([a-zA-Z0-9_])*'), 'page'); 
    9696            if (null == $pageName || file_exists(stubConfig::getConfigPath() . '/xml/pages/conf/' . $pageName . '.xml') == false) { 
    9797                $pageName = 'index'; 
     
    104104        $resultXSL = $xslProcessor->transformToDoc(); 
    105105        $resultXSL->xinclude(); 
    106          
    107106        // now we use the created xsl to transform the xml document created by the application 
    108107        $xslProcessor = new stubXSLProcessor(); 
  • trunk/src/main/php/net/stubbles/websites/xml/stubXMLProcessor.php

    r267 r276  
    6868    { 
    6969        if ($this->request->hasValue('page') == true) { 
    70             $pageName = $this->request->getValidatedValue(new stubRegexValidator('[a-zA-Z0-9_'), 'page'); 
     70            $pageName = $this->request->getValidatedValue(new stubRegexValidator('([a-zA-Z0-9_])*'), 'page'); 
    7171            if (null == $pageName || file_exists(stubConfig::getConfigPath() . '/xml/pages/conf/' . $pageName . '.xml') == false) { 
    7272                $pageName = 'index';