Changeset 411

Show
Ignore:
Timestamp:
08/26/2007 02:33:22 PM (16 months ago)
Author:
Geert
Message:

Beware of regexes with multiple .+? parts
See: http://regexadvice.com/blogs/regex_jedi/archive/2007/02/24/_2E002A003F00_-The-reason-to-any-slow-regex_2100_.aspx

Location:
branches/devel
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/devel/application/views/welcome.php

    r373 r411  
    1 <h2><?= $message ?></h2> 
     1<h2><?php echo $message ?></h2> 
    22<hr/> 
  • branches/devel/modules/user_guide/controllers/user_guide.php

    r405 r411  
    5353        public function _tags() 
    5454        { 
    55                 Kohana::$output = preg_replace_callback('!<(benchmark|event|file|definition)>.+?</.+?>!', array($this, '_tag_update'), Kohana::$output); 
     55                Kohana::$output = preg_replace_callback('!<(benchmark|event|file|definition)>.+?</[^>]+>!', array($this, '_tag_update'), Kohana::$output); 
    5656        } 
    5757 
    5858        public function _tag_update($match) 
    5959        { 
    60                 preg_match('!^<(.+?)>(.+?)</.+>$!', $match[0], $tag); 
     60                preg_match('!^<([^>]+)>(.+?)</[^>]+>$!', $match[0], $tag); 
    6161 
    6262                $type = $tag[2]; 
  • branches/devel/modules/user_guide/views/user_guide/content/general/bootstrapping.php

    r405 r411  
    11# System Bootstrapping 
    22 
    3 Kohana uses a <definition>Front Controller</definition> as part of it's design. This file is the <file>index</file> file that rests in the directory that Kohana is installed in. 
     3Kohana uses a <definition>Front Controller</definition> as part of its design. This file is the <file>index</file> file that rests in the directory that Kohana is installed in. 
    44 
    55The front controller validates the application and system paths, then loads <file>system/core/Bootstrap</file>. The Bootstrap file begins the process of initializing Kohana. 
  • branches/devel/system/core/Kohana.php

    r410 r411  
    408408        } 
    409409 
    410         public static function callback ($callback, $params = FALSE) 
     410        public static function callback($callback, $params = FALSE) 
    411411        { 
    412412                if (is_string($callback))